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 | |
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)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM.xs | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,5 @@ +- fix a very old segfault in unused code + Version 4.2 - 13 June 2012 - clean DB API (needs a new urpmi) @@ -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) { |