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

Paweł Wegner pawel.wegner95 at gmail.com
Fri Aug 3 21:28:33 EEST 2018


One could copy the initialization to the top from the while loop:
  init_sec_buffer(&outbuf[0], SECBUFFER_TOKEN, NULL, 0);
  init_sec_buffer(&outbuf[1], SECBUFFER_ALERT, NULL, 0);
  init_sec_buffer(&outbuf[2], SECBUFFER_EMPTY, NULL, 0);
  init_sec_buffer_desc(&outbuf_desc, outbuf, 3);

But memset is shorter. Current code will crash when there is any failure
before this initialization.



More information about the ffmpeg-devel mailing list