From ed8e3672c3f810eea37547a2a32e23a6441525aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Sun, 6 Mar 2011 16:45:12 +0000 Subject: fix crash when filename is found at end of @info@ line in synthesis (thx Cazzaniga Sandro :) --- URPM.xs | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.1