Skip to content

core: fix jaro-winkler heap-buffer-overflow

Romain Vimont requested to merge rom1v/vlc:fix_jaro into master

The implementation could read beyond the b string.

I encountered this crash by passing --opengl-filter=mock with an incorrect environment, but it could be reproduced with:

$ ./vlc --opaaaaaaa

Error: Unknown option `--opaaaaaaa'
=================================================================
==522294==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000022655 at pc 0x7f8b1793d73d bp 0x7ffe311de800 sp 0x7ffe311de7f8
READ of size 1 at 0x602000022655 thread T0
    #0 0x7f8b1793d73c in jaro_inner ../../src/config/jaro_winkler.c:111
    #1 0x7f8b1793db7a in vlc_jaro_winkler ../../src/config/jaro_winkler.c:159

Merge request reports

Loading