mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05: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;
|
||||
CURLcode error;
|
||||
|
||||
if(!conn->mech)
|
||||
/* not inititalized, return error */
|
||||
return -1;
|
||||
|
||||
DEBUGASSERT(level > PROT_NONE && level < PROT_LAST);
|
||||
|
||||
error = Curl_base64_decode(buffer + 4, (unsigned char **)&buf, &decoded_sz);
|
||||
|
Loading…
Reference in New Issue
Block a user