From 38386bd482c0a8102a79958cb3eddcb97a167ca3 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 9 Mar 2018 17:39:40 +1100 Subject: [PATCH] CVE-2017-8842 Fix divide-by-zero in bufRead::get --- libzpaq/libzpaq.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libzpaq/libzpaq.h b/libzpaq/libzpaq.h index 93387da..cbe211d 100644 --- a/libzpaq/libzpaq.h +++ b/libzpaq/libzpaq.h @@ -465,7 +465,8 @@ struct bufRead: public libzpaq::Reader { int get() { if (progress && !(*s_len % 128)) { - int pct = (total_len - *s_len) * 100 / total_len; + int pct = (total_len > 0) ? + (total_len - *s_len) * 100 / total_len : 100; if (pct / 10 != *last_pct / 10) { int i; b2cfe4ac6'/> Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/glib-CVE-2021-27219-11.patch
AgeCommit message (Expand)Author
2021-03-11gnu: glib: Fix CVE-2021-27218 and CVE-2021-27219....* gnu/packages/patches/glib-CVE-2021-27218.patch, gnu/packages/patches/glib-CVE-2021-27219-01.patch, gnu/packages/patches/glib-CVE-2021-27219-02.patch, gnu/packages/patches/glib-CVE-2021-27219-03.patch, gnu/packages/patches/glib-CVE-2021-27219-04.patch, gnu/packages/patches/glib-CVE-2021-27219-05.patch, gnu/packages/patches/glib-CVE-2021-27219-06.patch, gnu/packages/patches/glib-CVE-2021-27219-07.patch, gnu/packages/patches/glib-CVE-2021-27219-08.patch, gnu/packages/patches/glib-CVE-2021-27219-09.patch, gnu/packages/patches/glib-CVE-2021-27219-10.patch, gnu/packages/patches/glib-CVE-2021-27219-11.patch, gnu/packages/patches/glib-CVE-2021-27219-12.patch, gnu/packages/patches/glib-CVE-2021-27219-13.patch, gnu/packages/patches/glib-CVE-2021-27219-14.patch, gnu/packages/patches/glib-CVE-2021-27219-15.patch, gnu/packages/patches/glib-CVE-2021-27219-16.patch, gnu/packages/patches/glib-CVE-2021-27219-17.patch, gnu/packages/patches/glib-CVE-2021-27219-18.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/glib.scm (glib)[replacement]: New field. (glib/fixed): New variable. Mark H Weaver