djvulibre/djvulibre-invalid-tiff.patch
Petr Gajdos 33ad9176ce - security update
- added patches
  CVE-2019-15142 [bsc#1146702]
  + djvulibre-CVE-2019-15142.patch
  CVE-2019-15143 [bsc#1146569]
  + djvulibre-CVE-2019-15143.patch
  CVE-2019-15144 [bsc#1146571]
  + djvulibre-CVE-2019-15144.patch
  CVE-2019-15145 [bsc#1146572]
  + djvulibre-CVE-2019-15145.patch
  do not segfault when libtiff encounters corrupted TIFF (upstream issue #295)
  + djvulibre-invalid-tiff.patch

OBS-URL: https://build.opensuse.org/package/show/graphics/djvulibre?expand=0&rev=28
2019-09-02 12:14:18 +00:00

14 lines
535 B
Diff

diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp
index 3da3ea8..701238d 100644
--- a/tools/cjb2.cpp
+++ b/tools/cjb2.cpp
@@ -744,6 +744,8 @@ read_tiff(CCImage &rimg, ByteStream *bs, cjb2opts &opts)
readproc, writeproc, seekproc,
closeproc, sizeproc,
mapproc, unmapproc );
+ if (! tiff)
+ G_THROW("Tiff image is corrupted (cannot open)");
// bitonal
uint16 bps = 0, spp = 0;
TIFFGetFieldDefaulted(tiff, TIFFTAG_BITSPERSAMPLE, &bps);