OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc7da41
)
avcodec/pgssubdec: Bail out of decode_rle() if error and AV_EF_EXPLODE is set
author
John Stebbins
<stebbins@jetheaddev.com>
Wed, 18 Jun 2014 20:38:36 +0000
(13:38 -0700)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 30 Jun 2014 15:31:38 +0000
(17:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pgssubdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/pgssubdec.c
b/libavcodec/pgssubdec.c
index
4e30c06
..
f353c4c
100644
(file)
--- a/
libavcodec/pgssubdec.c
+++ b/
libavcodec/pgssubdec.c
@@
-150,9
+150,13
@@
static int decode_rle(AVCodecContext *avctx, AVSubtitleRect *rect,
* New Line. Check if correct pixels decoded, if not display warning
* and adjust bitmap pointer to correct new line position.
*/
- if (pixel_count % rect->w > 0)
+ if (pixel_count % rect->w > 0)
{
av_log(avctx, AV_LOG_ERROR, "Decoded %d pixels, when line should be %d pixels\n",
pixel_count % rect->w, rect->w);
+ if (avctx->err_recognition & AV_EF_EXPLODE) {
+ return AVERROR_INVALIDDATA;
+ }
+ }
line_count++;
}
}