Package: dpkg
Version: 1.3.22
Severity: wishlist
Seen in src/archives.c:
narglist[i++]= strdup("f");
narglist[i++]= strdup("-print0");
narglist[i++]= 0;
execvp(FIND, narglist);
ohshite(_("failed to exec find for --recursive"));
The original code read:
const char **arglist;
...
arglist[i++]= "f";
arglist[i++]= "-print0";
arglist[i++]= 0;
execvp(FIND, (char* const*)arglist);
and is more correct.
These calls to strdup are completely pointless; they should be
replaced by assignments. Because this will cause some trouble with
const-correctness because of the char** vs const char** perennial, the
cast in the call to execvp should be reinstated.
There is no actual _harm_ in using m_strdup here (see my other report
about the lack of error checking), apart from a tiny performance
penalty and a lack of clarity in the code, so I am setting the
severity to wishlist.
Ian.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]