* libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]:
Diagnose out-of-memory failure and return 0 rather than dereferencing NULL.
This commit is contained in:
parent
f8a3650a7c
commit
1e2aed2807
@ -1,3 +1,9 @@
|
||||
2011-05-31 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
* libtiff/tif_jpeg.c (JPEGDecodeRaw) [JPEG_LIB_MK1_OR_12BIT]:
|
||||
Diagnose out-of-memory failure and return 0 rather than
|
||||
dereferencing NULL.
|
||||
|
||||
2011-05-24 Frank Warmerdam <warmerdam@pobox.com>
|
||||
|
||||
* libtiff/tif_dirread.c: produce special error message for zero tag
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_jpeg.c,v 1.101 2011-02-23 21:58:00 fwarmerdam Exp $ */
|
||||
/* $Id: tif_jpeg.c,v 1.102 2011-05-31 16:51:50 bfriesen Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1997 Sam Leffler
|
||||
@ -1351,6 +1351,11 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
||||
unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
|
||||
sp->cinfo.d.output_width *
|
||||
sp->cinfo.d.num_components);
|
||||
if(tmpbuf==NULL) {
|
||||
TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
|
||||
"Out of memory");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user