]> git.marmaro.de Git - mmh/blobdiff - sbr/getarguments.c
Fix out-of-bounds error when incorporating email from stdin
[mmh] / sbr / getarguments.c
index a700443661a85b08fb1951e8b5f2c076710ce87b..e8da9849b8eaad0b25b63068c721f97d080a8996 100644 (file)
@@ -19,7 +19,7 @@ getarguments(char *invo_name, int argc, char **argv, int check_context)
        ** Check if profile/context specifies any arguments
        */
        if (check_context && (cp = context_find(invo_name))) {
-               cp = getcpy(cp);  /* make copy */
+               cp = mh_xstrdup(cp);  /* make copy */
                ap = brkstring(cp, " ", "\n");  /* split string */
 
                /* Count number of arguments split */
@@ -28,7 +28,7 @@ getarguments(char *invo_name, int argc, char **argv, int check_context)
                        n++;
        }
 
-       arguments = (char **) mh_xcalloc(argc + n, sizeof(*arguments));
+       arguments = mh_xcalloc(argc + n, sizeof(*arguments));
        bp = arguments;
 
        /* Copy any arguments from profile/context */