avformat/vapoursynth: properly initialize err variable in read_header_vs()
authornu774 <honeycomb77@gmail.com>
Thu, 3 Jan 2019 17:17:02 +0000 (02:17 +0900)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 4 Jan 2019 13:58:19 +0000 (14:58 +0100)
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@niedermayer.cc>
libavformat/vapoursynth.c

index f3ad691..69fde1a 100644 (file)
@@ -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) {