Author: djpig
Date: 2006-04-10 23:49:45 +0000 (Mon, 10 Apr 2006)
New Revision: 236
Modified:
trunk/ChangeLog
trunk/debian/changelog
trunk/src/archives.c
Log:
Fix typo in variable name. If hit, this could lead to a
infinite loop and OOM in varbufvprintf. (A
good way to hit it is installing files with
long non-ASCII filenames in UTF-8 locales).
Fixed also some typos in the comment for this
function. Closes: #346436
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-04-10 22:38:57 UTC (rev 235)
+++ trunk/ChangeLog 2006-04-10 23:49:45 UTC (rev 236)
@@ -1,5 +1,13 @@
2006-04-11 Frank Lichtenheld <[EMAIL PROTECTED]>
+ * src/archives.c (quote_filename): Fix typo in
+ variable name. If hit, this could lead to a
+ infinite loop and OOM in varbufvprintf. (A
+ good way to hit it is installing files with
+ long non-ASCII filenames in UTF-8 locales).
+ Fixed also some typos in the comment for this
+ function.
+
* scripts/dpkg-scanpackages.pl: Add -follow
to @find_args. This was lost in a previous patch
apparently.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-04-10 22:38:57 UTC (rev 235)
+++ trunk/debian/changelog 2006-04-10 23:49:45 UTC (rev 236)
@@ -3,6 +3,9 @@
[ Frank Lichtenheld ]
* Add -follow (back) to find call in dpkg-scanpackages.
Closes: #358011
+ * Fix error in archive.c that lead to a infinite loop when
+ installing files with long, non-ASCII filenames in
+ certain locales. Closes: #346436
[ Updated dpkg Translations ]
* French (Christian Perrier)
Modified: trunk/src/archives.c
===================================================================
--- trunk/src/archives.c 2006-04-10 22:38:57 UTC (rev 235)
+++ trunk/src/archives.c 2006-04-10 23:49:45 UTC (rev 236)
@@ -63,14 +63,14 @@
* file, is not ok, because
* - fd_fd_copy() == buffer_copy_setup() [include/dpkg.h]
* - buffer_copy_setup() uses varbufvprintf(&v, desc, al); [lib/mlib.c]
- * - varbufvpprintf() fails and memory exausted, because it call
+ * - varbufvprintf() fails and memory exausted, because it call
* fmt = "backend dpkg-deb during `%.255s'
* arg may contain some invalid char, for example,
* /usr/share/doc/console-tools/examples/unicode/\342\231\252\342\231\254
* in console-tools.
* In this case, if user uses some locale which doesn't support \342\231...,
- * vsnprintf() always return -1 and varbufextend() again and again
- * and memory exausted and die.
+ * vsnprintf() always returns -1 and varbufextend() get called again
+ * and again until memory is exausted and it aborts.
*
* So, we need to escape invalid char, probably as in
* tar-1.13.19/lib/quotearg.c: quotearg_buffer_restyled()
@@ -105,7 +105,7 @@
} else {
/* buffer full */
*buf = '\0'; /* XXX */
- return s;
+ return r;
}
}
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]