summaryrefslogtreecommitdiff
path: root/lib/curl_ntlm_msgs.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-03-25 08:32:12 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-03-25 08:32:12 +0100
commit4e299192ed3310b387d0c95d0d0d4d145991aef7 (patch)
tree9ab4cbe6decd9971ab46c2dd2b7b2c982d4e1d96 /lib/curl_ntlm_msgs.c
parente35f2e61ecf18153c9a0b152c1f1a8b3d9475cf3 (diff)
downloadcurl-4e299192ed3310b387d0c95d0d0d4d145991aef7.tar.gz
Curl_ssl_md5sum: return CURLcode
... since the funciton can fail on OOM. Check this return code. Coverity CID 1291705.
Diffstat (limited to 'lib/curl_ntlm_msgs.c')
-rw-r--r--lib/curl_ntlm_msgs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c
index b5f3935d8..7f07decb8 100644
--- a/lib/curl_ntlm_msgs.c
+++ b/lib/curl_ntlm_msgs.c
@@ -591,11 +591,11 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data,
memcpy(tmp, &ntlm->nonce[0], 8);
memcpy(tmp + 8, entropy, 8);
- Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH);
-
- /* We shall only use the first 8 bytes of md5sum, but the des
- code in Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */
- result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
+ result = Curl_ssl_md5sum(tmp, 16, md5sum, MD5_DIGEST_LENGTH);
+ if(!result)
+ /* We shall only use the first 8 bytes of md5sum, but the des code in
+ Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */
+ result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer);
if(result)
return result;