#4424 closed defect (fixed)

rtems-bin2c.c: Copy into fixed size buffer spotted by Coverity

Reported by: Ryan Long Owned by: Ryan Long <ryan.long@…>
Priority: normal Milestone: 6.1
Component: tool Version: 6
Severity: normal Keywords: Coverity
Cc: Blocked By:
Blocking:

Description

CID 1063892: Copy into fixed size buffer in process().

141  char *ifbasename;
142  ifbasename = basename(ifbasename_to_free);
143
   CID 1063892 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)13. fixed_size_dest: You might overrun the 1025-character fixed-size string buf by copying ifbasename without checking the length.
144  strcpy(buf, ifbasename);

Change History (2)

comment:1 Changed on 05/18/21 at 15:57:16 by Ryan Long

Keywords: Coverity added

comment:2 Changed on 09/29/21 at 14:58:29 by Ryan Long <ryan.long@…>

Owner: set to Ryan Long <ryan.long@…>
Resolution: fixed
Status: newclosed

In 05dab02/rtems-tools:

rtems-bin2c.c: Check length of buffer to be copied

CID 1063892: Copy into fixed size buffer in process().

Closes #4424

Note: See TracTickets for help on using tickets.