The following commit has been merged in the master branch: commit d6f176b4b8ad5fdf77f05704ee4c1abb3fa23ab4 Author: Guillem Jover <guil...@debian.org> Date: Sun May 15 03:33:53 2011 +0200
dpkg: Make fd variable passed to cu_closefd static The push_cleanup() call takes a pointer to the fd variable which resides in the stack. In case of error and stack unwinding due to longjmp, the value of fd might get overwritten by subsequent stack usage. Thus this kind of variables need to be static so that their value cannot change on stack rollback. diff --git a/src/filesdb.c b/src/filesdb.c index 4355340..e383955 100644 --- a/src/filesdb.c +++ b/src/filesdb.c @@ -276,7 +276,7 @@ pkg_files_add_file(struct pkginfo *pkg, const char *filename, void ensure_packagefiles_available(struct pkginfo *pkg) { - int fd; + static int fd; const char *filelistfile; struct fileinlist **lendp; struct stat stat_buf; -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org