mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
libavformat/tls_securetransport: fix argument evalulation order UB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
46f3015f35
commit
854972b53d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user