• Rémi Denis-Courmont's avatar
    Avoid arithmetic on NULL in VLC_OBJECT() kludge-macro · b8c7cf13
    Rémi Denis-Courmont authored
    If the offset of b within a is zero, then (&(a)->b) is equivalent to
    casting a to a pointer to the type of the b member. However this implies
    that a is a valid pointer. The expression is not valid if a is NULL.
    
    Especially sanitizers do not like this.
    b8c7cf13
vlc_objects.h 4.47 KB