projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7dbfcf
)
sgi: check maximum supported resolution
author
Piotr Bandurski
<ami_stuff@o2.pl>
Thu, 31 May 2012 18:10:04 +0000
(20:10 +0200)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Mon, 31 Mar 2014 23:13:18 +0000
(
01:13
+0200)
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
libavcodec/sgienc.c
patch
|
blob
|
blame
|
history
diff --git
a/libavcodec/sgienc.c
b/libavcodec/sgienc.c
index
ab1e36f
..
003f6be
100644
(file)
--- a/
libavcodec/sgienc.c
+++ b/
libavcodec/sgienc.c
@@
-30,6
+30,12
@@
static av_cold int encode_init(AVCodecContext *avctx)
{
+ if (avctx->width > 65535 || avctx->height > 65535) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Unsupported resolution %dx%d.\n", avctx->width, avctx->height);
+ return AVERROR_INVALIDDATA;
+ }
+
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);