[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).

* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
Harmony
Werner Lemberg 8 years ago
parent d87bb9160a
commit f0fa7a67bf
  1. 6
      ChangeLog
  2. 3
      src/cff/cffload.c

@ -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…
Cancel
Save