diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-08-13 19:58:18 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-08-13 19:58:18 +0000 |
commit | 3ae6eb8a6755478aae79a176f700dfc29068207a (patch) | |
tree | 67ff2ceb4f6f1c95ffef00230b05f5e6c38bdb56 | |
parent | a41c497e223d3056050086429a336b30c5ea8864 (diff) | |
download | perl-URPM-3ae6eb8a6755478aae79a176f700dfc29068207a.tar perl-URPM-3ae6eb8a6755478aae79a176f700dfc29068207a.tar.gz perl-URPM-3ae6eb8a6755478aae79a176f700dfc29068207a.tar.bz2 perl-URPM-3ae6eb8a6755478aae79a176f700dfc29068207a.tar.xz perl-URPM-3ae6eb8a6755478aae79a176f700dfc29068207a.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
(backported from trunk)
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.xs | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,6 @@ +- do not try to parse current pointer when the line is invalid or + empty (detected by valgrind) + Version 3.40.1 - 28 June 2012 - enable to read xz & bzip2 compressed synthesis @@ -3353,7 +3353,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; |