• antirez's avatar
    SDIFF iterator misuse fixed in diff algorithm #1. · 993e0ede
    antirez authored
    The bug could be easily triggered by:
    
        SADD foo a b c 1 2 3 4 5 6
        SDIFF foo foo
    
    When the key was the same in two sets, an unsafe iterator was used to
    check existence of elements in the same set we were iterating.
    Usually this would just result into a wrong output, however with the
    dict.c API misuse protection we have in place, the result was actually
    an assertion failed that was triggered by the CI test, while creating
    random datasets for the "MASTER and SLAVE consistency" test.
    993e0ede
t_set.c 32 KB