Commit e6c1e773 authored by Steve Holme's avatar Steve Holme
Browse files

sasl: Fixed null pointer reference when decoding empty digest challenge

Fixed a null pointer reference when an empty challenge is passed to the
Curl_sasl_create_digest_md5_message() function.

Bug: http://sourceforge.net/p/curl/bugs/1193/
Reported by: Saran Neti
parent 52281a10
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -283,6 +283,9 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
  if(result)
    return result;

  if(!chlg)
    return CURLE_LOGIN_DENIED;

  /* Retrieve nonce string from the challenge */
  if(!sasl_digest_get_key_value(chlg, "nonce=\"", nonce,
                                sizeof(nonce), '\"')) {