diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-05 01:58:09 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-05 01:58:09 +0000 |
commit | 45177ad6977c42110e71fa6b1ae612fefaef7549 (patch) | |
tree | 6402a27d174b5637933e5cc28d60ff38a1b83d08 | |
parent | d03f11065ce14b9868d3bdcb62673118488420ee (diff) | |
download | perl-URPM-45177ad6977c42110e71fa6b1ae612fefaef7549.tar perl-URPM-45177ad6977c42110e71fa6b1ae612fefaef7549.tar.gz perl-URPM-45177ad6977c42110e71fa6b1ae612fefaef7549.tar.bz2 perl-URPM-45177ad6977c42110e71fa6b1ae612fefaef7549.tar.xz perl-URPM-45177ad6977c42110e71fa6b1ae612fefaef7549.zip |
fix an invalid free() that would've happened if package summary were to be missing and the "" string constant were attempted to be freed
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM.xs | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,7 @@ Version 4.28 - May 2011, by Per Øyvind Karlsen +- fix an invalid free() that would've happened if package summary were to be + missing and the "" string constant were attempted to be freed - fix odd problems caused by attempt at translating correct tag names for query table into rpm tags - use newSVpvs() for pushing empty strings as constants in stead @@ -1048,7 +1048,7 @@ pack_header(URPM__Package pkg) { pkg->provides = pack_list(pkg->h, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDEVERSION, NULL); if (pkg->summary == NULL) { const char *summary = get_name(pkg->h, RPMTAG_SUMMARY); - pkg->summary = summary ? (char*)summary : ""; + pkg->summary = summary ? (char*)summary : strdup(""); } if (!(pkg->flag & FLAG_NO_HEADER_FREE)) pkg->h =headerFree(pkg->h); |