aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-03-06 16:45:12 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-03-06 16:45:12 +0000
commited8e3672c3f810eea37547a2a32e23a6441525aa (patch)
treee2caa7ff28afd64dd27077338cb5661b12f7d1f8
parent8d730af0403e2384c933daf37d35627b24d9caec (diff)
downloadperl-URPM-ed8e3672c3f810eea37547a2a32e23a6441525aa.tar
perl-URPM-ed8e3672c3f810eea37547a2a32e23a6441525aa.tar.gz
perl-URPM-ed8e3672c3f810eea37547a2a32e23a6441525aa.tar.bz2
perl-URPM-ed8e3672c3f810eea37547a2a32e23a6441525aa.tar.xz
perl-URPM-ed8e3672c3f810eea37547a2a32e23a6441525aa.zip
fix crash when filename is found at end of @info@ line in synthesis (thx Cazzaniga Sandro :)
-rw-r--r--URPM.xs5
1 files changed, 5 insertions, 0 deletions
diff --git a/URPM.xs b/URPM.xs
index 90817da..960b225 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -174,6 +174,11 @@ get_fullname_parts(URPM__Package pkg, char **name, char **version, char **releas
tmp = _eos;
}
} while(!distepoch && _eos != NULL);
+ /* XXX: filename at end of line, don't bother to support it, just make sure
+ * for it not to cause crash...
+ */
+ if ((tmp = strrchr(pkg->info, '.')) && !strcmp(tmp, ".rpm"))
+ distepoch = 0;
}
if ((_eos = strchr(pkg->info, '@')) != NULL) {