Check input pool for NULL

Resolves: #1943410
epel9
Marek Kasik 4 years ago
parent 4b8d9b4bcb
commit 439dfebe00

@ -0,0 +1,13 @@
diff --git a/libdjvu/DataPool.cpp b/libdjvu/DataPool.cpp
index 5fcbedf..4c2eaf0 100644
--- a/libdjvu/DataPool.cpp
+++ b/libdjvu/DataPool.cpp
@@ -791,6 +791,8 @@ DataPool::create(const GP<DataPool> & pool, int start, int length)
DEBUG_MSG("DataPool::DataPool: pool=" << (void *)((DataPool *)pool) << " start=" << start << " length= " << length << "\n");
DEBUG_MAKE_INDENT(3);
+ if (!pool) G_THROW( ERR_MSG("DataPool.zero_DataPool") );
+
DataPool *xpool=new DataPool();
GP<DataPool> retval=xpool;
xpool->init();

@ -3,7 +3,7 @@
Summary: DjVu viewers, encoders, and utilities
Name: djvulibre
Version: 3.5.27
Release: 25%{?dist}
Release: 26%{?dist}
License: GPLv2+
URL: http://djvu.sourceforge.net/
Source0: http://downloads.sourceforge.net/djvu/%{name}-%{version}.tar.gz
@ -17,6 +17,7 @@ Patch6: djvulibre-3.5.27-export-file.patch
Patch7: djvulibre-3.5.27-null-dereference.patch
Patch8: djvulibre-3.5.27-check-image-size.patch
Patch9: djvulibre-3.5.27-integer-overflow.patch
Patch10: djvulibre-3.5.27-check-input-pool.patch
Requires(post): xdg-utils
Requires(preun): xdg-utils
@ -78,6 +79,7 @@ Development files for DjVuLibre.
%patch7 -p1 -b .null-dereference
%patch8 -p1 -b .check-image-size
%patch9 -p1 -b .integer-overflow
%patch10 -p1 -b .check-input-pool
%build
@ -185,6 +187,10 @@ fi
%changelog
* Mon May 03 2021 Marek Kasik <mkasik@redhat.com> - 3.5.27-26
- Check input pool for NULL
- Resolves: #1943410
* Mon May 03 2021 Marek Kasik <mkasik@redhat.com> - 3.5.27-25
- Avoid integer overflow when allocating bitmap
- Resolves: #1943409

Loading…
Cancel
Save