summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2015-02-23 10:38:37 -0500
committerGedare Bloom <gedare@rtems.org>2015-02-23 10:38:37 -0500
commit1281c34a235fd031352dd43f437d84cf2c8421a7 (patch)
treec5b036b7fe6515c3ce11ec3a09e32a3d911fe1fe /tools
parent83fe4468bc3b0d9008ea3a4768bceee42895b510 (diff)
downloadrtems-1281c34a235fd031352dd43f437d84cf2c8421a7.tar.bz2
Use counted strnlen in bin2c. Closes #2238.
Diffstat (limited to 'tools')
-rw-r--r--tools/build/rtems-bin2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build/rtems-bin2c.c b/tools/build/rtems-bin2c.c
index 391c25901f..7674389740 100644
--- a/tools/build/rtems-bin2c.c
+++ b/tools/build/rtems-bin2c.c
@@ -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') )