##// END OF EJS Templates
chg: fix an undefined behavior about memcpy...
Jun Wu -
r38256:3c844935 stable
parent child Browse files
Show More
@@ -220,7 +220,10 b' static void execcmdserver(const struct c'
220 220
221 221 const char **argv = mallocx(sizeof(char *) * argsize);
222 222 memcpy(argv, baseargv, sizeof(baseargv));
223 memcpy(argv + baseargvsize, opts->args, sizeof(char *) * opts->argsize);
223 if (opts->args) {
224 size_t size = sizeof(char *) * opts->argsize;
225 memcpy(argv + baseargvsize, opts->args, size);
226 }
224 227 argv[argsize - 1] = NULL;
225 228
226 229 if (putenv("CHGINTERNALMARK=") != 0)
General Comments 0
You need to be logged in to leave comments. Login now