Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (70)

Sur d’autres sites (9190)

  • avcodec/vp9 : Fix stack-buffer overflow with VP9 VDPAU available

    11 octobre 2020, par Andreas Rheinhardt
    avcodec/vp9 : Fix stack-buffer overflow with VP9 VDPAU available
    

    ccca62ef991f0a47dfa30c3e822d91294b8afe4c added new VP9 VDPAU profiles
    and as a consequence AV_PIX_FMT_VDPAU can now be twice in the list of
    pixel formats used for format negotiation by ff_thread_get_format() ; yet
    there is only one entry in said list reserved for VDPAU, leading to a
    stack-buffer overflow. This commit fixes this by making sure that
    AV_PIX_FMT_VDPAU will not occur twice in said list.

    Fixes Coverity ticket 1468046.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/vp9.c
  • avcodec/decode : Avoid stack packets when decoding subtitles

    4 mars 2021, par Andreas Rheinhardt
    avcodec/decode : Avoid stack packets when decoding subtitles
    

    Use AVCodecInternal.buffer_pkt (previously only used in
    avcodec_send_packet) instead of stack packets when decoding subtitles.
    Also stop sharing side-data between packets and use the user-supplied
    packet directly for decoding when possible (no subtitle decoder ever
    modifies the packet it is given).
    Reusing AVCodecInternal.buffer_pkt is based upon an idea from James
    Almer.

    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/decode.c
  • avcodec/parser : Don't return pointer to stack buffer

    19 mars 2021, par Andreas Rheinhardt
    avcodec/parser : Don't return pointer to stack buffer
    

    When flushing, the parser receives a dummy buffer with padding
    that lives on the stack of av_parser_parse2(). Certain parsers
    (e.g. Dolby E) only analyze the input, but don't repack it. When
    flushing, such parsers return a pointer to the stack buffer and
    a size of 0. And this is also what av_parser_parse2() returns.

    Fix this by always resetting poutbuf in case poutbuf_size is zero.

    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/parser.c