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:
bf5b5d2
)
avfilter: check a malloc in avfilter_link().
author
Anton Khirnov
<anton@khirnov.net>
Mon, 1 Apr 2013 13:44:21 +0000
(15:44 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 17 May 2013 18:32:27 +0000
(20:32 +0200)
Additionally change sizeof(type) into sizeof(var)
libavfilter/avfilter.c
patch
|
blob
|
history
diff --git
a/libavfilter/avfilter.c
b/libavfilter/avfilter.c
index
95fc700
..
b7913a1
100644
(file)
--- a/
libavfilter/avfilter.c
+++ b/
libavfilter/avfilter.c
@@
-87,8
+87,11
@@
int avfilter_link(AVFilterContext *src, unsigned srcpad,
return AVERROR(EINVAL);
}
- src->outputs[srcpad] =
- dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));
+ link = av_mallocz(sizeof(*link));
+ if (!link)
+ return AVERROR(ENOMEM);
+
+ src->outputs[srcpad] = dst->inputs[dstpad] = link;
link->src = src;
link->dst = dst;