Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/libtiff/0008-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch

Issue 2405693002: libtiff: Prevent a buffer overflow in function ChopUpSingleUncompressedStrip. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/libtiff/README.pdfium » ('j') | third_party/libtiff/tif_aux.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/third_party/libtiff/tif_aux.c b/third_party/libtiff/tif_aux.c
2 index 3ce3680..bc4ea01 100644
3 --- a/third_party/libtiff/tif_aux.c
4 +++ b/third_party/libtiff/tif_aux.c
5 @@ -69,7 +69,7 @@ _TIFFCheckRealloc(TIFF* tif, void* buffer,
6 /*
7 * XXX: Check for integer overflow.
8 */
9 - if (nmemb && elem_size && !_TIFFIfMultiplicationOverflow(nmemb, elem_siz e))
10 + if (nmemb > 0 && elem_size > 0 && !_TIFFIfMultiplicationOverflow(nmemb, elem_size))
11 cp = _TIFFrealloc(buffer, bytes);
12
13 if (cp == NULL) {
OLDNEW
« no previous file with comments | « no previous file | third_party/libtiff/README.pdfium » ('j') | third_party/libtiff/tif_aux.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698