#2238 closed defect (fixed)

build/rtems-bin2c.c:75: possibly unterminated string ?

Reported by: David Binderman Owned by: Gedare Bloom <gedare@…>
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:


[rtems/tools/build/rtems-bin2c.c:75]: (error) Dangerous usage of 'obasename' (strncpy doesn't always null-terminate it).

Source code is

strncpy( obasename, ofname, PATH_MAX );
len = strlen( obasename );

Change History (2)

comment:1 Changed on Feb 23, 2015 at 3:38:50 PM by Gedare Bloom <gedare@…>

Owner: set to Gedare Bloom <gedare@…>
Resolution: fixed
Status: newclosed

In 1281c34a235fd031352dd43f437d84cf2c8421a7/rtems:

Use counted strnlen in bin2c. Closes #2238.

comment:2 Changed on Feb 23, 2015 at 3:55:30 PM by Sebastian Huber <sebastian.huber@…>

In 748fbd1b3f999b29220a3665775a6f967167dc09/rtems:

rtems-bin2c: Fix Windows build

Update #2238.

Note: See TracTickets for help on using tickets.