diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:44 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:44 +0000 |
commit | a7c1739c95b0b2f9ef189b0fd80b296a377eea04 (patch) | |
tree | 659abb52a74f554dece9ba5a4c2f26d880d843a2 /URPM.xs | |
parent | 25a54f906d78de9069ece2af21dca9c0a43fe48e (diff) | |
download | perl-URPM-a7c1739c95b0b2f9ef189b0fd80b296a377eea04.tar perl-URPM-a7c1739c95b0b2f9ef189b0fd80b296a377eea04.tar.gz perl-URPM-a7c1739c95b0b2f9ef189b0fd80b296a377eea04.tar.bz2 perl-URPM-a7c1739c95b0b2f9ef189b0fd80b296a377eea04.tar.xz perl-URPM-a7c1739c95b0b2f9ef189b0fd80b296a377eea04.zip |
(get_fullname_parts) fix a very old segfault in unused code
rationale: .info is set only if filled by pack_header() from header
tags or by parse_line() (from a synthesis)
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -127,6 +127,8 @@ static void get_fullname_parts(URPM__Package pkg, char **name, char **version, char **release, char **arch, char **eos) { char *_version = NULL, *_release = NULL, *_arch = NULL, *_eos = NULL; + if (!pkg->info) + return; if ((_eos = strchr(pkg->info, '@')) != NULL) { *_eos = 0; /* mark end of string to enable searching backwards */ if ((_arch = strrchr(pkg->info, '.')) != NULL) { |