Actions
Bug #13681
closedlibfruraw: writing 1 byte into a region of size 0
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Build error with gcc 10:
../fruraw.c: In function 'frt_get_segment_name': ../fruraw.c:552:41: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 552 | segs[each_seg].name[FRU_SEGNAMELEN] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from ../fru_access_impl.h:50, from ../fruraw.c:32: ../fru_access.h:62:7: note: at offset 2 to object 'name' with size 2 declared here 62 | char name[SEG_NAME_LEN]; /* from container section header */ | ^~~~
This issue is about writing past array end.
Testing done: build/install/boot
Actions