• Andreas Rheinhardt's avatar
    avutil/aes: Don't use out-of-bounds index · f49375f2
    Andreas Rheinhardt authored
    Up until now, av_aes_init() uses a->round_key[0].u8 + t
    as dst of memcpy where it is intended for t to greater
    than 16 (u8 is an uint8_t[16]); given that round_key itself
    is an array, it is actually intended for the dst to be
    in a latter round_key member. To do this properly,
    just cast a->round_key to unsigned char*.
    
    This fixes the srtp, aes, aes_ctr, mov-3elist-encrypted,
    mov-frag-encrypted and mov-tenc-only-encrypted
    FATE-tests with (Clang-)UBSan.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    f49375f2
aes.c 8.33 KB