ref: c776fc17bfeaa607405fc96620e9445e7a0965c3
parent: 82365c0dead99dd119d9e7117cf4f36ce1d1cbe1
author: Werner Lemberg <[email protected]>
date: Sat Feb 25 09:21:01 EST 2012
[pcf] Fix Savannah bug #35603. * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in `strings' array.
binary files a/ChangeLog b/ChangeLog differ
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -2,8 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010 by
+ Copyright 2000-2010, 2012 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -496,7 +495,8 @@
goto Bail;
}
- if ( FT_NEW_ARRAY( strings, string_size ) )
+ /* allocate one more byte so that we have a final null byte */
+ if ( FT_NEW_ARRAY( strings, string_size + 1 ) )
goto Bail;
error = FT_Stream_Read( stream, (FT_Byte*)strings, string_size );