The following commit has been merged in the master branch:
commit d8d0b3a06f8668a2c7e8c3db2debd60cf526e7f1
Author: Guillem Jover <[email protected]>
Date: Wed Sep 30 20:55:16 2009 +0200
libdpkg: Use varbuf_grow instead of increasing member used
The code assumes that the various varbuf functions will grow the
buffer if used > size, which is not going to be true once varbuf gets
internally switched to varbuf_grow from varbufextend.
diff --git a/src/configure.c b/src/configure.c
index f691046..200d8ae 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -90,8 +90,9 @@ deferred_configure_conffile(struct pkginfo *pkg, struct
conffile *conff)
varbufreset(&cdr2);
varbufaddstr(&cdr2, cdr.buf);
- cdr2.used += 50;
varbufaddc(&cdr2, 0);
+ /* XXX: Make sure there's enough room for extensions. */
+ varbuf_grow(&cdr2, 50);
cdr2rest = cdr2.buf + strlen(cdr.buf);
/* From now on we can just strcpy(cdr2rest, extension); */
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]