[FFmpeg-devel] [PATCH] avformat/tls_schannel: Fix use of uninitialized variable

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Aug 3 03:04:33 EEST 2018


2018-08-02 20:46 GMT+02:00, PaweĊ‚ Wegner <pawel.wegner95 at gmail.com>:
> Fixes: runtime error: passing uninitialized value to FreeContextBuffer
> causes a crash
> ---
>  libavformat/tls_schannel.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavformat/tls_schannel.c b/libavformat/tls_schannel.c
> index 065dccb..6953008 100644
> --- a/libavformat/tls_schannel.c
> +++ b/libavformat/tls_schannel.c
> @@ -154,6 +154,8 @@ static int tls_client_handshake_loop(URLContext *h, int
> initial)
>      SecBufferDesc inbuf_desc;
>      int i, ret = 0, read_data = initial;
>
> +    memset(outbuf, 0, sizeof(outbuf));

Is the memset necessary or is an initialization of the variable sufficient?

Carl Eugen


More information about the ffmpeg-devel mailing list