The following commit has been merged in the master branch:
commit fb18783ce260a07d3f3a5f5a3a81640a45a9d089
Author: Guillem Jover <guil...@debian.org>
Date:   Fri Aug 5 06:23:59 2011 +0200

    libdpkg: Initialize ps->pkg and ps->pkgbin to NULL in parse_open()
    
    This guarantees the parsedb_state variable is in a sane state after
    the parse_open() call.

diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 13b447b..5760eba 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -315,6 +315,8 @@ parse_open(struct parsedb_state *ps, const char *filename,
   ps->filename = filename;
   ps->flags = flags;
   ps->lno = 0;
+  ps->pkg = NULL;
+  ps->pkgbin = NULL;
 
   fd = open(filename, O_RDONLY);
   if (fd == -1)

-- 
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

Reply via email to