Skip to content
  • Rob Swindell's avatar
    0a6fdb95
    Fix crash in net_wm_state_is_cb when running GCC ASan-enabled build · 0a6fdb95
    Rob Swindell authored
    Check size of X11 property before dereferencing as an Atom.
    This fixes:
    ==10203==ERROR: AddressSanitizer: heap-buffer-overflow on address
    0x602000065970 at pc 0x5c5834fb8812 bp 0x7819c717c220 sp 0x7819c717c218
    READ of size 8 at 0x602000065970 thread T2 (X11 Events)
        #0 0x5c5834fb8811 in net_wm_state_is_cb ../conio/x_events.c:1541
    
    But I'm not clear when nitems_return (nir) might represent > 8-bit items or how
    to detect that, so perhaps there's a *better* fix?
    0a6fdb95
    Fix crash in net_wm_state_is_cb when running GCC ASan-enabled build
    Rob Swindell authored
    Check size of X11 property before dereferencing as an Atom.
    This fixes:
    ==10203==ERROR: AddressSanitizer: heap-buffer-overflow on address
    0x602000065970 at pc 0x5c5834fb8812 bp 0x7819c717c220 sp 0x7819c717c218
    READ of size 8 at 0x602000065970 thread T2 (X11 Events)
        #0 0x5c5834fb8811 in net_wm_state_is_cb ../conio/x_events.c:1541
    
    But I'm not clear when nitems_return (nir) might represent > 8-bit items or how
    to detect that, so perhaps there's a *better* fix?
Loading