d7c71db Ticket 48387 - ASAN invalid read in cos_cache.c

Authored and Committed by William Brown 4 years ago
    Ticket 48387 - ASAN invalid read in cos_cache.c
    Bug Description:  ==7050== ERROR: AddressSanitizer?: global-buffer-overflow on
    address 0x7f643b32c5ff at pc 0x7f643b3217aa bp 0x7f64331c5f60 sp 0x7f64331c5f50
    READ of size 1 at 0x7f643b32c5ff thread T5
        #0 0x7f643b3217a9 in cos_cache_backwards_stricmp_and_clip
    Issue exists in the array offset check, which allows the value to go to -1
    causing the invalid read.
    Fix Description:  Fix the check to only allow the offset to go to 0, not -1
    Author: wibrown
    Review by: nhosoi (Thank you!)