tiff/tiff-CVE-2017-18013.patch
Michael Vetter c9f5a6aca9 Accepting request 610254 from home:pgajdos
- security update
  * CVE-2017-18013 [bsc#1074317]
    + tiff-CVE-2017-18013.patch

OBS-URL: https://build.opensuse.org/request/show/610254
OBS-URL: https://build.opensuse.org/package/show/graphics/tiff?expand=0&rev=117
2018-05-18 09:24:19 +00:00

22 lines
898 B
Diff

--- a/libtiff/tif_print.c
+++ b/libtiff/tif_print.c
@@ -665,13 +665,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
(unsigned long) s,
- (unsigned __int64) td->td_stripoffset[s],
- (unsigned __int64) td->td_stripbytecount[s]);
+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
#else
fprintf(fd, " %3lu: [%8llu, %8llu]\n",
(unsigned long) s,
- (unsigned long long) td->td_stripoffset[s],
- (unsigned long long) td->td_stripbytecount[s]);
+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
#endif
}
}