Commit 854972b5 authored by Rodger Combs's avatar Rodger Combs Committed by Michael Niedermayer

libavformat/tls_securetransport: fix argument evalulation order UB

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 46f3015f
......@@ -350,8 +350,9 @@ 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;
int ret = map_ssl_error(SSLRead(c->ssl_context, buf, size, &processed), processed);
size_t processed = 0;
int ret = SSLRead(c->ssl_context, buf, size, &processed);
ret = map_ssl_error(ret, processed);
if (ret > 0)
return ret;
if (ret == 0)
......@@ -362,8 +363,9 @@ 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;
int ret = map_ssl_error(SSLWrite(c->ssl_context, buf, size, &processed), processed);
size_t processed = 0;
int ret = SSLWrite(c->ssl_context, buf, size, &processed);
ret = map_ssl_error(ret, processed);
if (ret > 0)
return ret;
if (ret == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment