Do not dereference NULL per bug report from Victor V. Vengerov <vvv@oktet.ru>.

This commit is contained in:
Joel Sherrill
2000-05-16 18:58:18 +00:00
parent 01e0e43f7f
commit 017cb2be68

View File

@@ -39,7 +39,10 @@ void _Objects_Copy_name_string(
unsigned8 *source_p = (unsigned8 *) source; unsigned8 *source_p = (unsigned8 *) source;
unsigned8 *destination_p = (unsigned8 *) destination; unsigned8 *destination_p = (unsigned8 *) destination;
do { *destination_p = '\0';
*destination_p++ = *source_p; if ( source_p ) {
} while ( *source_p++ ); do {
*destination_p++ = *source_p;
} while ( *source_p++ );
}
} }