projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c3b428
)
ffprobe: set writer context to 0 after allocation
author
Stefano Sabatini
<stefasab@gmail.com>
Tue, 19 Mar 2013 16:57:50 +0000
(17:57 +0100)
committer
Stefano Sabatini
<stefasab@gmail.com>
Tue, 19 Mar 2013 17:00:34 +0000
(18:00 +0100)
Avoid access to uninitialized values, which may result in a crash.
This happens for example in case of option parsing failure, since in that
case the internal AVBprint buffers are not initialized.
ffprobe.c
patch
|
blob
|
history
diff --git
a/ffprobe.c
b/ffprobe.c
index
ef9bef4
..
4d2d3e1
100644
(file)
--- a/
ffprobe.c
+++ b/
ffprobe.c
@@
-300,7
+300,7
@@
static int writer_open(WriterContext **wctx, const Writer *writer, const char *a
{
int i, ret = 0;
- if (!(*wctx = av_malloc(sizeof(WriterContext)))) {
+ if (!(*wctx = av_malloc
z
(sizeof(WriterContext)))) {
ret = AVERROR(ENOMEM);
goto fail;
}