Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit e292d75113fdcb28dcd76321771ec139393af35e 1 parent 1c3b428
@saste saste authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ffprobe.c
View
2  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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.