aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-08-10 23:46:48 +0000
committerPascal Terjan <pterjan@mageia.org>2012-08-10 23:46:48 +0000
commitca28862a178c8988d0dafb5c8386f8f1652f553a (patch)
tree417425e154ac24812cdbdfa1523ef21c4a4bf886
parentf97f12b0567dd18204f17a5ee48e6c8850337da5 (diff)
downloadperl-URPM-ca28862a178c8988d0dafb5c8386f8f1652f553a.tar
perl-URPM-ca28862a178c8988d0dafb5c8386f8f1652f553a.tar.gz
perl-URPM-ca28862a178c8988d0dafb5c8386f8f1652f553a.tar.bz2
perl-URPM-ca28862a178c8988d0dafb5c8386f8f1652f553a.tar.xz
perl-URPM-ca28862a178c8988d0dafb5c8386f8f1652f553a.zip
Do not try to parse current pointer when the line is invalid or empty.
This fixes a "Conditional jump or move depends on uninitialised value" during empty synthesis parsing
-rw-r--r--URPM.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index fd2e61f..b0338b1 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2897,7 +2897,8 @@ Urpm_parse_synthesis__XS(urpm, filename, ...)
p = &buff[buff_len-(p-buff)];
}
// EOF:
- if (!parse_line(depslist, provides, obsoletes, &pkg, p, urpm, callback))
+ if (ok && buff_len > 0
+ && !parse_line(depslist, provides, obsoletes, &pkg, p, urpm, callback))
ok = 0;
if (Fclose(f) != 0) ok = 0;
SPAGAIN;