diff --git a/djvulibre-3.5.27-out-of-bound-write-2.patch b/djvulibre-3.5.27-out-of-bound-write-2.patch index d7db88d..f2fae47 100644 --- a/djvulibre-3.5.27-out-of-bound-write-2.patch +++ b/djvulibre-3.5.27-out-of-bound-write-2.patch @@ -7,7 +7,7 @@ index 60a4f39..b11df7b 100644 char *buffer = textUTF8.getbuf(textsize); int readsize = bs.read(buffer,textsize); - buffer[readsize] = 0; -+ if (readsize > 0) ++ if (buffer) + buffer[readsize] = 0; if (readsize < textsize) G_THROW( ERR_MSG("DjVuText.corrupt_chunk") ); diff --git a/djvulibre.spec b/djvulibre.spec index a28a79c..e606e5d 100644 --- a/djvulibre.spec +++ b/djvulibre.spec @@ -3,7 +3,7 @@ Summary: DjVu viewers, encoders, and utilities Name: djvulibre Version: 3.5.27 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv2+ URL: http://djvu.sourceforge.net/ Source0: http://downloads.sourceforge.net/djvu/%{name}-%{version}.tar.gz @@ -195,6 +195,10 @@ fi %changelog +* Fri Jul 02 2021 Marek Kasik - 3.5.27-30 +- Improve previous commit +- Resolves: #1977428 + * Fri Jul 02 2021 Marek Kasik - 3.5.27-29 - Fix out-of-bounds write in djvutext - Resolves: #1977428