forked from minhngoc25a/freetype2
[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
This commit is contained in:
parent
d87bb9160a
commit
f0fa7a67bf
|
@ -1,3 +1,9 @@
|
|||
2016-09-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
|
||||
|
||||
* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
|
||||
|
||||
2016-09-02 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[unix] Enable 64bit support in file system access (#48962).
|
||||
|
|
|
@ -602,7 +602,8 @@
|
|||
|
||||
if ( !FT_ALLOC( name, byte_len + 1 ) )
|
||||
{
|
||||
FT_MEM_COPY( name, bytes, byte_len );
|
||||
if ( byte_len )
|
||||
FT_MEM_COPY( name, bytes, byte_len );
|
||||
name[byte_len] = 0;
|
||||
}
|
||||
cff_index_forget_element( idx, &bytes );
|
||||
|
|
Loading…
Reference in New Issue