Fix Savannah bug #43548.

* src/pcf/pcfread (pcf_get_encodings): Add sanity checks for row and
column values.
This commit is contained in:
Werner Lemberg 2014-11-06 23:25:05 +01:00
parent 0e2f5d518c
commit ef1eba7518
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2014-11-06 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #43548.
* src/pcf/pcfread (pcf_get_encodings): Add sanity checks for row and
column values.
2014-11-06 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #43547.

View File

@ -830,6 +830,15 @@ THE SOFTWARE.
if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
return FT_THROW( Invalid_File_Format );
/* sanity checks */
if ( firstCol < 0 ||
firstCol > lastCol ||
lastCol > 0xFF ||
firstRow < 0 ||
firstRow > lastRow ||
lastRow > 0xFF )
return FT_THROW( Invalid_Table );
FT_TRACE4(( "pdf_get_encodings:\n" ));
FT_TRACE4(( " firstCol %d, lastCol %d, firstRow %d, lastRow %d\n",