[scudo] Use cast on calls to __builtin_umul_overflow/__builtin_umull_overflow am: 82ea5b5cf6

Original change: https://android-review.googlesource.com/c/platform/external/scudo/+/2063220

Change-Id: I3f837921b1dfccc13c8e201c7de84cac967b5f52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/standalone/wrappers_c_checks.h b/standalone/wrappers_c_checks.h
index ec9c1a1..815d400 100644
--- a/standalone/wrappers_c_checks.h
+++ b/standalone/wrappers_c_checks.h
@@ -47,9 +47,12 @@
 // costly division.
 inline bool checkForCallocOverflow(uptr Size, uptr N, uptr *Product) {
 #if __has_builtin(__builtin_umull_overflow) && (SCUDO_WORDSIZE == 64U)
-  return __builtin_umull_overflow(Size, N, Product);
+  return __builtin_umull_overflow(Size, N,
+                                  reinterpret_cast<unsigned long *>(Product));
 #elif __has_builtin(__builtin_umul_overflow) && (SCUDO_WORDSIZE == 32U)
-  return __builtin_umul_overflow(Size, N, Product);
+  // On, e.g. armv7, uptr/uintptr_t may be defined as unsigned long
+  return __builtin_umul_overflow(Size, N,
+                                 reinterpret_cast<unsigned int *>(Product));
 #else
   *Product = Size * N;
   if (!Size)