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:
c73b1a1
)
noise_bsf: fix division by 0
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 14 Oct 2012 19:45:42 +0000
(21:45 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 14 Oct 2012 19:45:42 +0000
(21:45 +0200)
Fixes CID733737
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/noise_bsf.c
patch
|
blob
|
history
diff --git
a/libavcodec/noise_bsf.c
b/libavcodec/noise_bsf.c
index
1cab3e1
..
763af79
100644
(file)
--- a/
libavcodec/noise_bsf.c
+++ b/
libavcodec/noise_bsf.c
@@
-32,6
+32,9
@@
static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const ch
int amount= args ? atoi(args) : (*state % 10001+1);
int i;
+ if(amount <= 0)
+ return AVERROR(EINVAL);
+
*poutbuf= av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(*poutbuf, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);