projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
575c38d
)
lavf: fix segfault in av_open_input_stream()
author
Anton Khirnov
<anton@khirnov.net>
Tue, 12 Jul 2011 20:42:18 +0000
(22:42 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Wed, 13 Jul 2011 18:49:31 +0000
(20:49 +0200)
ic is NULL in case of error.
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
e738dba
..
71fa955
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-466,7
+466,8
@@
int av_open_input_stream(AVFormatContext **ic_ptr,
else
ic->pb = pb;
- err = avformat_open_input(&ic, filename, fmt, &opts);
+ if ((err = avformat_open_input(&ic, filename, fmt, &opts)) < 0)
+ goto fail;
ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above
*ic_ptr = ic;