The file name parsed from dfu_alo_info can be longer than NAME_SIZE,
so strcpy function has possiblity of overflow.
Remove the possible overflow using strncpy with less length than
NAME_SIZE.
Change-Id: Ib70f539a810e553136421c7faa576144811c3112
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
/* Parsing file name */
s = strsep(&setting, ";");
st = strsep(&s, " ");
- strcpy(usbdown[i].name, st);
+ strncpy(usbdown[i].name, st, NAME_SIZE - 1);
ret = usb_fill_entity(&usbdown[i], s, alt_num_count,
interface, devstr);