]> git.marmaro.de Git - mmh/blobdiff - sbr/fmt_compile.c
Fix out-of-bounds error when incorporating email from stdin
[mmh] / sbr / fmt_compile.c
index 85ed7d74f2032e587ddc76c8a436a8b515729c45..566f620939018eac7824fe2ae80e49a6ae5d920c 100644 (file)
@@ -308,8 +308,8 @@ fmt_compile(char *fstring, struct format **fmt)
        size_t i;
 
        if (format_string)
-               free(format_string);
-       format_string = getcpy(fstring);
+               mh_free0(&format_string);
+       format_string = mh_xstrdup(fstring);
        usr_fstring = fstring;
 
        /* init the component hash table. */