mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 15:50:48 -04:00
ftp-gss: check for init before use
To avoid dereferencing a NULL pointer. Reported-by: Daniel Romero
This commit is contained in:
parent
57cad81091
commit
5fe164a258
@ -367,6 +367,10 @@ int Curl_sec_read_msg(struct connectdata *conn, char *buffer,
|
|||||||
size_t decoded_sz = 0;
|
size_t decoded_sz = 0;
|
||||||
CURLcode error;
|
CURLcode error;
|
||||||
|
|
||||||
|
if(!conn->mech)
|
||||||
|
/* not inititalized, return error */
|
||||||
|
return -1;
|
||||||
|
|
||||||
DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
|
DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
|
||||||
|
|
||||||
error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz);
|
error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user