CVSROOT: /sources/freetype Module name: freetype2 Changes by: David Turner <freetype> 06/06/04 14:50:57
Modified files: . : ChangeLog src/base : ftutil.c Log message: * src/base/ftutil.c (ft_mem_qrealloc): fix the function to accept 'item_size == 0' as well, though this sounds weird, it can theorically happen. see bug #16669 CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/freetype2/ChangeLog?cvsroot=freetype&r1=1.1342&r2=1.1343 http://cvs.savannah.gnu.org/viewcvs/freetype2/src/base/ftutil.c?cvsroot=freetype&r1=1.22&r2=1.23 Patches: Index: ChangeLog =================================================================== RCS file: /sources/freetype/freetype2/ChangeLog,v retrieving revision 1.1342 retrieving revision 1.1343 diff -u -b -r1.1342 -r1.1343 --- ChangeLog 4 Jun 2006 14:33:08 -0000 1.1342 +++ ChangeLog 4 Jun 2006 14:50:56 -0000 1.1343 @@ -1,5 +1,11 @@ 2006-06-04 David Turner <[EMAIL PROTECTED]> + * src/base/ftutil.c (ft_mem_qrealloc): fix the function + to accept 'item_size == 0' as well, though this sounds + weird, it can theorically happen. + + see bug #16669 + * src/pfr/pfrobjs.c (pfr_face_init): fix the computation of 'face->num_glyphs' which missed the last glyph, due to the offset-by-1 computation, since the PFR format doesn't Index: src/base/ftutil.c =================================================================== RCS file: /sources/freetype/freetype2/src/base/ftutil.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -b -r1.22 -r1.23 --- src/base/ftutil.c 2 May 2006 22:22:16 -0000 1.22 +++ src/base/ftutil.c 4 Jun 2006 14:50:57 -0000 1.23 @@ -120,12 +120,16 @@ FT_Error error = FT_Err_Ok; - if ( cur_count < 0 || new_count < 0 || item_size <= 0 ) + /* note that we now accept item_size == 0 as a valid + * parameter. this in order to cover very weird cases + * where a ALLOC_MULT macro would be called + */ + if ( cur_count < 0 || new_count < 0 || item_size < 0 ) { /* may help catch/prevent nasty security issues */ error = FT_Err_Invalid_Argument; } - else if ( new_count == 0 ) + else if ( new_count == 0 || item_size == 0 ) { ft_mem_free( memory, block ); block = NULL; _______________________________________________ Freetype-cvs mailing list Freetype-cvs@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-cvs