diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index d32f6edf8..eca465f00 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -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;