forked from Imagelibrary/rtems
Use counted strnlen in bin2c. Closes #2238.
This commit is contained in:
@@ -72,7 +72,7 @@ void process(const char *ifname, const char *ofname)
|
||||
}
|
||||
|
||||
strncpy( obasename, ofname, PATH_MAX );
|
||||
len = strlen( obasename );
|
||||
len = strnlen( obasename, PATH_MAX );
|
||||
if ( len >= 2 ) {
|
||||
if ( obasename[len-2] == '.' ) {
|
||||
if ( (obasename[len-1] == 'c') || (obasename[len-1] == 'h') )
|
||||
|
||||
Reference in New Issue
Block a user