aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-04-21 01:23:40 +0000
committerThierry Vignaud <tv@mageia.org>2011-04-21 01:23:40 +0000
commited8f05f5176b76c6f35484d0eb2d3db12879dbb7 (patch)
tree8ed77fdf629ecab037d07179e58f1c7cc9fc83f3
parentb2e9ef91992116c18be9b1c4abaeae794b35d82e (diff)
downloadperl-URPM-ed8f05f5176b76c6f35484d0eb2d3db12879dbb7.tar
perl-URPM-ed8f05f5176b76c6f35484d0eb2d3db12879dbb7.tar.gz
perl-URPM-ed8f05f5176b76c6f35484d0eb2d3db12879dbb7.tar.bz2
perl-URPM-ed8f05f5176b76c6f35484d0eb2d3db12879dbb7.tar.xz
perl-URPM-ed8f05f5176b76c6f35484d0eb2d3db12879dbb7.zip
(return_list_str) memset some struct, thus fixing crashing while removing several packages (#248)
-rw-r--r--NEWS2
-rw-r--r--URPM.xs2
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 65c9c41..d0d82db 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix crashing while removing several packages (#248)
+
Version 3.38 - 16 November 2010
- fix the key parsing to handle PEM encapsulated header portion (bug
diff --git a/URPM.xs b/URPM.xs
index 9e36e24..4971528 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -423,6 +423,8 @@ return_list_str(char *s, Header header, int32_t tag_name, int32_t tag_flags, int
struct rpmtd_s list, flags, list_evr;
if (headerGet(header, tag_name, &list, HEADERGET_DEFAULT)) {
+ memset((void*)&flags, 0, sizeof(flags));
+ memset((void*)&list_evr, 0, sizeof(list_evr));
if (tag_flags) headerGet(header, tag_flags, &flags, HEADERGET_DEFAULT);
if (tag_version) headerGet(header, tag_version, &list_evr, HEADERGET_DEFAULT);
while (rpmtdNext(&list) >= 0) {