Skip to content
  • Filip Roséen's avatar
    codec/substtml: prevent crash on empty attributes · aa2c1853
    Filip Roséen authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    
    
    The previous implementation assumed that an attribute would always
    have at least one specified region/style, which is not always the
    case.
    
    An attribute's value of zero-length, or one that contains only spaces,
    would make strtok_r return NULL - resulting in undefined-behavior
    further down the road.
    
    In order to prevent these issues, an additional branch has been
    introduced to warn if such attributes are found, and simply ignore
    them.
    
    fixes #17405
    
    Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
    aa2c1853