]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/in_pack_i1.c
Introduce xmallocarray, an overflow checking variant of xmalloc.
[thirdparty/gcc.git] / libgfortran / generated / in_pack_i1.c
index 2356102e3fb2b9e37a5d8e85ab5e9a8ec8e04a64..2ee5e283747c3981c76aa7524d510748048721d9 100644 (file)
@@ -76,7 +76,7 @@ internal_pack_1 (gfc_array_i1 * source)
     return source->base_addr;
 
   /* Allocate storage for the destination.  */
-  destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
+  destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
   dest = destptr;
   src = source->base_addr;
   stride0 = stride[0];