GNOME Bugzilla – Bug 782510
cuisine-page: Fix using possible invalid index
Last modified: 2017-05-11 14:28:28 UTC
.
Created attachment 351614 [details] [review] cuisine-page: Fix using possible invalid index If the loop preceding didn't break, the value of index `i' would be `self->n_categories'. As this would be out of the array boundary, a segmentation fault was happening here. This was found by -fsanitize=address: ==4919==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x614000027df0 at pc 0x55f314f2ff1c bp 0x7ffe34e80db0 sp 0x7ffe34e80da8 WRITE of size 4 at 0x614000027df0 thread T0 #0 0x55f314f2ff1b in gr_cuisine_page_set_cuisine ../src/gr-cuisine-page.c:282 #1 0x55f314faaaba in gr_window_show_cuisine ../src/gr-window.c:1376
Attachment 351614 [details] pushed as 3d0d800 - cuisine-page: Fix using possible invalid index