Fix technically incorrect malloc size in re_match. Omit needless cast.
authorTaylor R Campbell <campbell@mumble.net>
Sun, 6 Apr 2014 22:10:20 +0000 (22:10 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sun, 6 Apr 2014 22:10:20 +0000 (22:10 +0000)
src/microcode/regex.c

index 46833366a4337da66450c86f1b4329cda6bead88..4745d67d55ad080504c385e7cd8a69b2a26415c4 100644 (file)
@@ -543,8 +543,7 @@ re_match (unsigned char * pattern_start,
   translation = (buffer -> translation);
   syntax_table = (buffer -> syntax_table);
 
-  stack_start =
-    ((unsigned char **) (malloc ((2 * RE_NFAILURES) * (sizeof (char *)))));
+  stack_start = (malloc ((2 * RE_NFAILURES) * (sizeof (*stack_start))));
   if (stack_start == NULL)
     RE_RETURN (-3);