aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.xs9
1 files changed, 5 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index f0d8357..d2a45aa 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -291,10 +291,11 @@ get_fullname_parts(URPM__Package pkg, char **name, int *epoch, char **version, c
if (arch != NULL) *arch = pubkey ? "" : _arch + 1;
if (distepoch != NULL || disttag != NULL || release != NULL || version != NULL || name != NULL) {
if((_distepoch = strchr(strrchr(pkg->provides, '-'), ':')) != NULL) {
- tmp = strrchr(_distepoch+1, ']');
- backup_char(tmp);
- tmp = strstr(pkg->info, _distepoch+1);
- backup_char(tmp);
+ if((tmp = strrchr(_distepoch+1, ']'))) {
+ backup_char(tmp);
+ if((tmp = strstr(pkg->info, _distepoch+1)))
+ backup_char(tmp);
+ }
}
if(distepoch != NULL) *distepoch = _distepoch ? _distepoch+1 : NULL;
if (disttag != NULL || release != NULL || version != NULL || name != NULL) {