summaryrefslogtreecommitdiff
path: root/libavcodec/scpr.c
Commit message (Collapse)AuthorAge
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/scpr: Check minimum size of type 17Michael Niedermayer2019-10-10
| | | | | | | | | Improves: Timeout (85sec -> 46sec) Improves: 17644/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5715704283660288 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/decode: add a flags parameter to ff_reget_buffer()James Almer2019-09-04
| | | | | | | | | | Some decoders may not need a writable buffer in some specific cases, but only a reference to the existing buffer with updated frame properties instead, for the purpose of returning duplicate frames. For this, the FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential allocations and buffer copies when they are not needed. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/scpr: Use av_memcpy_backptr() in type 17 and 33Michael Niedermayer2019-08-11
| | | | | | | | | | | | This makes the changed code-path faster. Change not tested except with the fuzzer testcase as I found no other testcase. Improves: Timeout (136sec -> 74sec) Improves: 16040/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5705876062601216 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* avcodec/scpr: fix checking ret value of decode_run_iMarton Balint2019-05-24
| | | | | | Fixes Coverity CID 1441460. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/scpr: check remaining data after decodeMichael Niedermayer2019-05-09
| | | | | | | | Fixes Timeout (29sec -> 14sec) Fixes: 13713/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5756778069884928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: avoid using uninitialized valuePaul B Mahol2019-04-28
| | | | Fixes #7872.
* avcodec/scpr: Perform frame copy laterMichael Niedermayer2019-03-20
| | | | | | | Optimization found while looking at 13442/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5758293933293568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: Fix use of uninitialized variableMichael Niedermayer2019-03-06
| | | | | | | | Fixes: Undefined shift Fixes: 12911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5677102915911680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: add version 3 supportPaul B Mahol2018-11-18
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: Skip frames which change nothingMichael Niedermayer2018-09-30
| | | | | | | | Fixes: Timeout Fixes: 10292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5687943864254464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: stop checking for overread twicePaul B Mahol2018-09-09
|
* avcodec/scpr: make sure count and min are validPaul B Mahol2018-09-07
|
* avcodec/scpr: refactor repeated code into decode_units()Paul B Mahol2018-09-01
|
* avcodec/scpr: error out if run length is <= 0Paul B Mahol2018-08-29
|
* avcodec/scpr: Check for min > max in decompress_p()Michael Niedermayer2018-08-16
| | | | | | | | Fixes: Timeout Fixes: 9342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4795990841229312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: fix decoding of prev+top-topleft prediction in keyframesPaul B Mahol2018-04-02
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: check for possible out of array accessPaul B Mahol2018-04-02
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: Fix reading a pixel before the firstMichael Niedermayer2018-02-11
| | | | | | | Fixes: 5540/clusterfuzz-testcase-minimized-6122458273808384 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: optimize shift loop.Michael Niedermayer2017-09-10
| | | | | | | | | | | Speeds code up from 50sec to 15sec Fixes Timeout Fixes: 3242/clusterfuzz-testcase-5811951672229888 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* scpr: Added missing error checkDerek Buitenhuis2017-07-07
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/scpr: mask bits to prevent out of array readMichael Niedermayer2017-05-16
| | | | | | | | Fixes: 1615/clusterfuzz-testcase-minimized-6625214647500800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type ↵Michael Niedermayer2017-05-13
| | | | | | | | | 'unsigned int [256]' Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: Check y in first line loop in decompress_i()Michael Niedermayer2017-05-11
| | | | | | | | Fixes: out of array access Fixes: 1478/clusterfuzz-testcase-minimized-5285486908145664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: Fix multiple runtime error: signed integer overflow: ↵Michael Niedermayer2017-05-09
| | | | | | | | | 2147483647 + 1 cannot be represented in type 'int' Fixes: 1422/clusterfuzz-testcase-minimized-5030993939398656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: use correct linesize for prev framePaul B Mahol2017-03-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: fix top left prediction for special case when x is 0 for keyframesPaul B Mahol2017-03-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: check if total_freq is 0 in decode0Paul B Mahol2017-02-27
| | | | | | Fixes SIGFPE, closes #6196. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: add support for older versionPaul B Mahol2017-02-26
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: remove 4 dead storePaul B Mahol2017-02-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: improve motion vectors checking for out of buffer writePaul B Mahol2017-02-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: make sure that component value is <= 0x1F for 16 bpcPaul B Mahol2017-02-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: improve check for out of range motion vectorsPaul B Mahol2017-02-23
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: check that current row is in valid rangePaul B Mahol2017-02-23
| | | | | | Stops writing out of dst array. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/scpr: do not allow out of array access for 16bit casePaul B Mahol2017-02-23
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: add ScreenPressor decoderPaul B Mahol2017-02-22
Signed-off-by: Paul B Mahol <onemda@gmail.com>