From: Taylor R Campbell Date: Sun, 6 Apr 2014 22:10:20 +0000 (+0000) Subject: Fix technically incorrect malloc size in re_match. Omit needless cast. X-Git-Tag: release-9.2.0~20 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fd5db95c84a77252ae769893f2bbe4a82f27cbc3;p=mit-scheme.git Fix technically incorrect malloc size in re_match. Omit needless cast. --- diff --git a/src/microcode/regex.c b/src/microcode/regex.c index 46833366a..4745d67d5 100644 --- a/src/microcode/regex.c +++ b/src/microcode/regex.c @@ -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);