+2008-01-01 Guillem Jover <guillem@debian.org>
+
+ * src/archives.c (archivefiles): Remove pointless strdup for execvp
+ arguments.
+
2008-01-01 Ian Zimmerman <itz@buug.org>
* scripts/install-info.pl: Ignore wrapped lines when matching
* Ignore wrapped lines in install-info when matching section titles.
Closes: #214684
Thanks to Andreas Metzler and Ian Zimmerman.
+ * Do not use strdup for execvp arguments. Closes: #379027
[ Updated dpkg translations ]
* Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918
m_dup2(pi[1],1); close(pi[0]); close(pi[1]);
for (i=0, ap=argv; *ap; ap++, i++);
narglist= m_malloc(sizeof(char*)*(i+15));
- narglist[0]= strdup(FIND);
+ narglist[0] = FIND;
for (i=1, ap=argv; *ap; ap++, i++) {
if (strchr(FIND_EXPRSTARTCHARS,(*ap)[0])) {
char *a;
strcat(a,*ap);
narglist[i]= a;
} else {
- narglist[i]= strdup(*ap);
+ narglist[i] = (char *)*ap;
}
}
- narglist[i++]= strdup("-follow"); /* When editing these, make sure that */
- narglist[i++]= strdup("-name"); /* arglist is mallocd big enough, above. */
- narglist[i++]= strdup(ARCHIVE_FILENAME_PATTERN);
- narglist[i++]= strdup("-type");
- narglist[i++]= strdup("f");
- narglist[i++]= strdup("-print0");
+ /* When editing these, make sure that arglist is malloced big enough,
+ * above.
+ */
+ narglist[i++] = "-follow";
+ narglist[i++] = "-name";
+ narglist[i++] = ARCHIVE_FILENAME_PATTERN;
+ narglist[i++] = "-type";
+ narglist[i++] = "f";
+ narglist[i++] = "-print0";
narglist[i++]= 0;
execvp(FIND, narglist);
ohshite(_("failed to exec find for --recursive"));