Re: [hatari-devel] ASAN issues with tests -> ASAN issue with sdl gui

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 01/08/2022 à 19:36, Eero Tamminen a écrit :
Hi,

On 31.7.2022 23.09, Nicolas Pomarède wrote:
I found another reproducable asan crash related to gui and SDL file selector. for example : start hatari, then press F12 and choose 'ROM' and 'browse tos image". then in the fileselector, press "page down" key or scroll mouse wheel down -> you will get the following crash (you need to have enough files in the dir to do a scroll) (this also work with the floppy file browser) :

==528992==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000002e19b70 at pc 0x00000299dd5e bp 0x7fff58fb4a10 sp 0x7fff58fb4a08
READ of size 4 at 0x000002e19b70 thread T0
     #0 0x299dd5d in SDLGui_DoDialogExt /home/npomarede/src/hatari.git/src/gui-sdl/sdlgui.c:1163      #1 0x29903a2 in SDLGui_FileSelect /home/npomarede/src/hatari.git/src/gui-sdl/dlgFileSelect.c:825      #2 0x2991eb9 in SDLGui_FileConfSelect

I pushed a fix.

File selector was giving dialog code an invalid / negative object index ("no match" error code from previous call) when e.g. mouse wheel is used.

I confirm this fixed my issue.

Nicolas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/