[master] Check for sCAL chunk too short.
This commit is contained in:
parent
af96543688
commit
61a2d8a2a7
3
ANNOUNCE
3
ANNOUNCE
@ -49,7 +49,8 @@ version 1.4.8beta04 [June 7, 2011]
|
||||
Frank Busse, related to CVE-2004-0421).
|
||||
|
||||
version 1.4.8beta05 [June 18, 2011]
|
||||
Fixed error in "ACCURATE" 16-to-8 scaling.
|
||||
Fixed error in "ACCURATE" 16-to-8 scaling (John Bowler).
|
||||
Check for sCAL chunk too short.
|
||||
|
||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -2817,7 +2817,8 @@ version 1.4.8beta04 [June 7, 2011]
|
||||
Frank Busse, related to CVE-2004-0421).
|
||||
|
||||
version 1.4.8beta05 [June 18, 2011]
|
||||
Fixed error in "ACCURATE" 16-to-8 scaling.
|
||||
Fixed error in "ACCURATE" 16-to-8 scaling (John Bowler).
|
||||
Check for sCAL chunk too short.
|
||||
|
||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||
|
@ -1861,6 +1861,14 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Need unit type, width, \0, height: minimum 4 bytes */
|
||||
else if (length < 4)
|
||||
{
|
||||
png_warning(png_ptr, "sCAL chunk too short");
|
||||
png_crc_finish(png_ptr, length);
|
||||
return;
|
||||
}
|
||||
|
||||
png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)",
|
||||
(unsigned long)(length + 1));
|
||||
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user