Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-03-19 20:57:50 +0400
committerStefano Sabatini <stefasab@gmail.com>2013-03-19 21:00:34 +0400
commite292d75113fdcb28dcd76321771ec139393af35e (patch)
tree3b013c6ad8392bda7f50a3ebffb8a8e3286476bd /ffprobe.c
parent1c3b4281148cf04e8befe2fa55e832cfa7133a47 (diff)
ffprobe: set writer context to 0 after allocation
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.
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffprobe.c b/ffprobe.c
index ef9bef44c7..4d2d3e1e47 100644
--- 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_mallocz(sizeof(WriterContext)))) {
ret = AVERROR(ENOMEM);
goto fail;
}