diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2021-01-06 23:43:41 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2021-03-22 12:12:12 +0200 |
commit | 5c354742ec998bd32206a51df509979a3474945d (patch) | |
tree | d099860d17ac8482b084cee962bf15bf862794bf | |
parent | 691af1073e76dfd07fde690093de7dcf066d4914 (diff) | |
download | rpm-5c354742ec998bd32206a51df509979a3474945d.tar.gz |
rpmio: Fix lzopen_internal mode parsing when 'Tn' is used
When there is number after "T" (suggested number of threads or "0" for
getncpus), lzopen_internal() mode parser would skip one byte, and when
it's at the end of the string it would then parse undesired garbage from
the memory, making intermittent compression failures.
Fixes: 7740d1098 ("Add support for multithreaded xz compression")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
(cherry picked from commit 405fc8998181353bd510864ca251dc233afec276)
-rw-r--r-- | rpmio/rpmio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index bcae69035..0e1b5a10f 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -772,6 +772,7 @@ static LZFILE *lzopen_internal(const char *mode, int fd, int xz) * should've processed * */ while (isdigit(*++mode)); + --mode; } #ifdef HAVE_LZMA_MT else |