Skip to content

invalid memory read in VC2Decoder::setVideoFormat #17

Description

@hannob

The attached file will cause an invalid memory read. Found with afl+address sanitizer.

invalidread.zip

stack trace:

==7875==ERROR: AddressSanitizer: SEGV on unknown address 0x55a1d37df2c0 (pc 0x55a1d36c879b bp 0x603000000893 sp 0x7ffc6a202160 T0)
==7875==The signal is caused by a READ memory access.
    #0 0x55a1d36c879a in VC2Decoder::setVideoFormat(_VC2DecoderParamsInternal&) /f/vc2/vc2hqdecode/vc2hqdecode/VC2Decoder.cpp:499
    #1 0x55a1d36cff4e in VC2Decoder::parseSeqHeader(char*, char const*) /f/vc2/vc2hqdecode/vc2hqdecode/VC2Decoder.cpp:458
    #2 0x55a1d36d7a24 in VC2Decoder::sequenceSynchronise(char**, int, bool) /f/vc2/vc2hqdecode/vc2hqdecode/VC2Decoder.cpp:190
    #3 0x55a1d36bbc28 in vc2decode_synchronise /f/vc2/vc2hqdecode/vc2hqdecode/vc2hqdecode.cpp:109
    #4 0x55a1d366130f in main /f/vc2/vc2hqdecode/testprogs/vc2decode.cpp:253
    #5 0x7fe83208df85 in __libc_start_main (/lib64/libc.so.6+0x20f85)
    #6 0x55a1d3668be9 in _start (/r/vc2/vc2decode+0x1abe9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions