Grab dependency name & version strings as argv-style arrays
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 20 Jan 2009 12:16:58 +0000 (14:16 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 20 Jan 2009 12:16:58 +0000 (14:16 +0200)
commit9f755c72c7390304e8799edae3afbf872ad4cff9
tree47788aa0c4c7157b5c3b22f0625df03b8b4256c8
parent05f5c353242d0dfa70ef49918c73c92dec923920
Grab dependency name & version strings as argv-style arrays
- Related to ticket #22, this fixes rpmdsMerge() on data grabbed from
  header. Prior to this, the following would blow up with memory corruption
  as headerGet() string array wasn't NULL-terminated
rpmds d1 = rpmdsNew(h, RPMTAG_REQUIRENAME, 0);
rpmds d2 = rpmdsSingle(RPMTAG_REQUIRENAME, "foo", "1", 0);
rpmdsMerge(&d1, d2);
lib/rpmds.c