The following commit has been merged in the master branch:
commit 280ac914cc52ee5de079c0833bb1df5005c1e7ab
Author: Guillem Jover <[email protected]>
Date: Sat Feb 19 09:26:13 2011 +0100
dpkg: Only copy already counted output lines from find
Instead of appending two NUL characters to be able to track the end of
the NUL terminated lines from find's output. Just handle the number of
lines we have already counted previously.
diff --git a/src/archives.c b/src/archives.c
index 18a26fd..3eff7ca 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -4,7 +4,7 @@
*
* Copyright © 1994,1995 Ian Jackson <[email protected]>
* Copyright © 2000 Wichert Akkerman <[email protected]>
- * Copyright © 2007-2010 Guillem Jover <[email protected]>
+ * Copyright © 2007-2011 Guillem Jover <[email protected]>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1245,12 +1245,9 @@ void archivefiles(const char *const *argv) {
if (!nfiles)
ohshit(_("searched, but found no packages (files matching *.deb)"));
- varbuf_add_char(&findoutput, '\0');
- varbuf_add_char(&findoutput, '\0');
-
arglist= m_malloc(sizeof(char*)*(nfiles+1));
- p= findoutput.buf; i=0;
- while (*p) {
+ p = findoutput.buf;
+ for (i = 0; i < nfiles; i++) {
arglist[i++]= p;
while (*p++ != '\0') ;
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]