aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2010-10-13 22:15:27 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2010-10-13 22:15:27 +0000
commit70ef83260f7727ef31232fc0494c152b72bfd652 (patch)
tree7e5c5b70de612f62812880b7a44e7499568aa92b
parentbfe8467ec64eed7e418f0ff4813726af5ec49b6f (diff)
downloadperl-URPM-70ef83260f7727ef31232fc0494c152b72bfd652.tar
perl-URPM-70ef83260f7727ef31232fc0494c152b72bfd652.tar.gz
perl-URPM-70ef83260f7727ef31232fc0494c152b72bfd652.tar.bz2
perl-URPM-70ef83260f7727ef31232fc0494c152b72bfd652.tar.xz
perl-URPM-70ef83260f7727ef31232fc0494c152b72bfd652.zip
check that ']' exists in ranges_overlap() before trying backup
-rw-r--r--URPM.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 23d1f89..1b17ba2 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -352,8 +352,8 @@ ranges_overlap(uint32_t aflags, char *sa, uint32_t bflags, char *sb) {
EVR_t lEVR = rpmEVRnew(aflags, 0),
rEVR = rpmEVRnew(bflags, 0);
- backup_char(eosa);
- backup_char(eosb);
+ if(eosa) backup_char(eosa);
+ if(eosb) backup_char(eosb);
rpmEVRparse(sa, lEVR);
rpmEVRparse(sb, rEVR);
/* TODO: upstream bug? should rpmEVRparse really reset Flags? */