[FFmpeg-devel] [PATCH] libavformat/tls_securetransport: silence uninitialized value warning
Michael Niedermayer
michaelni at gmx.at
Sun Oct 4 12:44:19 CEST 2015
On Sat, Oct 03, 2015 at 05:31:33PM -0500, Rodger Combs wrote:
> ---
> libavformat/tls_securetransport.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/tls_securetransport.c b/libavformat/tls_securetransport.c
> index 73662d7..cdc7953 100644
> --- a/libavformat/tls_securetransport.c
> +++ b/libavformat/tls_securetransport.c
> @@ -350,7 +350,7 @@ static int map_ssl_error(OSStatus status, size_t processed)
> static int tls_read(URLContext *h, uint8_t *buf, int size)
> {
> TLSContext *c = h->priv_data;
> - size_t processed;
> + size_t processed = 0;
> int ret = map_ssl_error(SSLRead(c->ssl_context, buf, size, &processed), processed);
> if (ret > 0)
> return ret;
> @@ -362,7 +362,7 @@ static int tls_read(URLContext *h, uint8_t *buf, int size)
> static int tls_write(URLContext *h, const uint8_t *buf, int size)
> {
> TLSContext *c = h->priv_data;
> - size_t processed;
> + size_t processed = 0;
> int ret = map_ssl_error(SSLWrite(c->ssl_context, buf, size, &processed), processed);
this looks wrong before and after the patch
SSL* must set processed before it is used in map_ssl_error() but
the code doesnt neccessarily do that
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151004/3d3b40a2/attachment.sig>
More information about the ffmpeg-devel
mailing list