mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
parent
0920fb834a
commit
0ac029e1c0
6
r5dev/thirdparty/curl/security.c
vendored
6
r5dev/thirdparty/curl/security.c
vendored
@ -193,7 +193,6 @@ static CURLcode read_data(struct connectdata *conn,
|
||||
struct krb5buffer *buf)
|
||||
{
|
||||
int len;
|
||||
void *tmp = NULL;
|
||||
CURLcode result;
|
||||
|
||||
result = socket_read(fd, &len, sizeof(len));
|
||||
@ -203,12 +202,11 @@ static CURLcode read_data(struct connectdata *conn,
|
||||
if(len) {
|
||||
/* only realloc if there was a length */
|
||||
len = ntohl(len);
|
||||
tmp = Curl_saferealloc(buf->data, len);
|
||||
buf->data = Curl_saferealloc(buf->data, len);
|
||||
}
|
||||
if(tmp == NULL)
|
||||
if(!len || !buf->data)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
buf->data = tmp;
|
||||
result = socket_read(fd, buf->data, len);
|
||||
if(result)
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user