diff mbox

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

Message ID 20180802191005.4489-1-pawel.wegner95@gmail.com
State Withdrawn, archived
Headers show

Commit Message

Paweł Wegner Aug. 2, 2018, 7:10 p.m. UTC
Fixes: runtime error: passing uninitialized value to FreeContextBuffer
causes a crash

Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
---
 libavformat/tls_schannel.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/libavformat/tls_schannel.c b/libavformat/tls_schannel.c
index f41b007773..6b51c1f3dc 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));
+
     if (c->enc_buf == NULL) {
         c->enc_buf_offset = 0;
         ret = av_reallocp(&c->enc_buf, SCHANNEL_INITIAL_BUFFER_SIZE);