[FFmpeg-cvslog] avformat/vapoursynth: properly initialize err variable in read_header_vs()
nu774
git at videolan.org
Fri Jan 4 17:01:23 EET 2019
ffmpeg | branch: master | nu774 <honeycomb77 at gmail.com> | Fri Jan 4 02:17:02 2019 +0900| [e0686318ddd7a5138d1847d97fe967fb2e813802] | committer: Michael Niedermayer
avformat/vapoursynth: properly initialize err variable in read_header_vs()
The variable "err" is not initialized, and set only when something went wrong.
When everything is OK, nobody sets it, so using it result in UB.
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0686318ddd7a5138d1847d97fe967fb2e813802
---
libavformat/vapoursynth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/vapoursynth.c b/libavformat/vapoursynth.c
index f3ad6910e5..69fde1a806 100644
--- a/libavformat/vapoursynth.c
+++ b/libavformat/vapoursynth.c
@@ -177,7 +177,7 @@ static av_cold int read_header_vs(AVFormatContext *s)
char dummy;
const VSVideoInfo *info;
struct VSState *vss_state;
- int err;
+ int err = 0;
vss_state = av_mallocz(sizeof(*vss_state));
if (!vss_state) {
More information about the ffmpeg-cvslog
mailing list