• Simon McVittie's avatar
    gbytes: Avoid memcmp (NULL, ., 0) or memcmp (., NULL, 0) · 8235bbe4
    Simon McVittie authored
    Similar to 3837b83f, glibc memcmp is declared with the first two
    arguments annotated as non-null via an attribute, which results in the
    undefined behaviour sanitizer considering it to be UB to pass a null
    pointer there (even if we are comparing 0 bytes, and hence not actually
    dereferencing the pointer).
    
    This shows up in /gvariant/serialiser/children when run with the
    undefined behaviour sanitizer.
    Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
    8235bbe4