• A
    BITOP bug when called against non existing keys fixed. · 1419406e
    antirez 提交于
    In the issue #529 an user reported a bug that can be triggered with the
    following code:
    
    flushdb
    set a
    "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    bitop or x a b
    
    The bug was introduced with the speed optimization in commit 8bbc0768
    that specializes every BITOP operation loop up to the minimum length of
    the input strings.
    
    However the computation of the minimum length contained an error when a
    non existing key was present in the input, after a key that was non zero
    length.
    
    This commit fixes the bug and adds a regression test for it.
    1419406e
bitops.tcl 5.0 KB