mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 06:54:41 +08:00
psxhdrs/strncat: Fix string truncation warning
This commit is contained in:
committed by
Sebastian Huber
parent
21c7e3a41f
commit
699f465c50
@@ -45,7 +45,7 @@
|
||||
char buffer[SIZE] = "computer";
|
||||
char *result;
|
||||
|
||||
result = strncat( buffer, " program", 3 );
|
||||
result = strncat( buffer, " program", sizeof( buffer ) - 1 );
|
||||
|
||||
return ( result != NULL );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user