* psobjs.c (ps_table_add): Check length before calling FT_MEM_CPY
.
Fixes issue #1280.
This commit is contained in:
parent
2280346192
commit
37cefe33b2
@ -201,7 +201,9 @@
|
||||
/* add the object to the base block and adjust offset */
|
||||
table->elements[idx] = FT_OFFSET( table->block, table->cursor );
|
||||
table->lengths [idx] = length;
|
||||
FT_MEM_COPY( table->block + table->cursor, object, length );
|
||||
/* length == 0 also implies a NULL destination, so skip the copy call */
|
||||
if ( length > 0 )
|
||||
FT_MEM_COPY( table->block + table->cursor, object, length );
|
||||
|
||||
table->cursor += length;
|
||||
return FT_Err_Ok;
|
||||
|
Loading…
Reference in New Issue
Block a user