mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
Do not dereference NULL per bug report from Victor V. Vengerov <vvv@oktet.ru>.
This commit is contained in:
@@ -39,7 +39,10 @@ void _Objects_Copy_name_string(
|
||||
unsigned8 *source_p = (unsigned8 *) source;
|
||||
unsigned8 *destination_p = (unsigned8 *) destination;
|
||||
|
||||
do {
|
||||
*destination_p++ = *source_p;
|
||||
} while ( *source_p++ );
|
||||
*destination_p = '\0';
|
||||
if ( source_p ) {
|
||||
do {
|
||||
*destination_p++ = *source_p;
|
||||
} while ( *source_p++ );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user