2006-04-11 Frank Lichtenheld <djpig@debian.org>
+ * 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.
[ 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)
* 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()
} else {
/* buffer full */
*buf = '\0'; /* XXX */
- return s;
+ return r;
}
}
}