|
|
@@ -63,14 +63,14 @@ int cflict_index = 0;
|
|
|
* 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 @@ quote_filename(char *buf, int size, char *s)
|
|
|
} else {
|
|
|
/* buffer full */
|
|
|
*buf = '\0'; /* XXX */
|
|
|
- return s;
|
|
|
+ return r;
|
|
|
}
|
|
|
}
|
|
|
}
|