Fix out-of-bounds error when incorporating email from stdin
[mmh] / sbr / getarguments.c
index a700443..e8da984 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 */