1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-25 10:51:49 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
Michael Niedermayer
23ae3cc822 avformat/oggparsedaala: Do not leave an invalid value in gpshift
Fixes: undefined behavior
Fixes: 702974

Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-01 22:09:23 +02:00
Michael Niedermayer
679a315424 avformat/oggparsedaala: Check duration for AV_NOPTS_VALUE
This avoids an integer overflow
the solution matches oggparsevorbis.c and 45581ed15d

Fixes: 700242

Found-by: Thomas Guilbert <tguilbert@google.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-01 22:09:23 +02:00
Derek Buitenhuis
6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Andreas Cadhalpun
c112be25f7 oggparsedaala: reject too large gpshift
Also use a unsigned constant for the shift calculation, as 1 << 31 is
undefined for int32_t. This is also fixed oggparsetheora.

This fixes ubsan runtime error: shift exponent is too large for
32-bit type 'int'

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-02 12:00:39 +01:00
Andreas Cadhalpun
b4466c9c1a oggparsedaala: check number of planes in pixel format map
This fixes crashes caused by out-of-bounds writes.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-29 18:42:14 +01:00
Rostislav Pehlivanov
591b240ed4 oggparsedaala: sync with current bitstream syntax
Since the parser was merged back almost 2 months ago this is the first
time the bitstream of the container has been updated.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-12-18 22:54:38 +00:00
Rostislav Pehlivanov
0f87cbdd51 lavf: add oggparsedaala and bump micro
This commit introduces a parser for the current bitstream produced by
Daala. It currently bears a large similarity with Theora, another
codec produced by Xiph. While likely to change in the future, its basic
format of packet parsing should remain fairly identical with its current
structure.
Once the bitstream freezes, there are a few probable simplifications
that could be made. Also, the current version (major, minor and micro)
is stuck at zero so it's unusable as a way to warn about possible
incompatibilities. This will change once the bitstream freezes,
however until then this file is strictly targeting the current git
master of the reference encoder, libdaala.

This file was developed independently at the same time by both myself
and Vittorio Giovara, who used libav as a starting point. For fairness,
and to prevent confusion and allegations, his name has been added to the
copyright in the license header as well, and vice versa.
2015-10-21 06:02:47 +01:00