]> granicus.if.org Git - curl/commitdiff
curl_ntlm_core: fix 2 curl_off_t constant overflows.
authorPatrick Monnerat <patrick.monnerat@dh.com>
Thu, 5 Nov 2015 14:20:43 +0000 (15:20 +0100)
committerPatrick Monnerat <patrick.monnerat@dh.com>
Thu, 5 Nov 2015 14:20:43 +0000 (15:20 +0100)
lib/curl_ntlm_core.c

index 38ce8055162d88b8ae895e6a2734e3046a3e478c..db13781a2c65ad3f5c2f8926abd5debb961a07df 100644 (file)
@@ -676,10 +676,10 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
 #ifdef DEBUGBUILD
   char *force_timestamp = getenv("CURL_FORCETIME");
   if(force_timestamp)
-    tw = (curl_off_t)11644473600 * 10000000;
+    tw = CURL_OFF_T_C(11644473600) * 10000000;
   else
 #endif
-    tw = ((curl_off_t)time(NULL) + 11644473600) * 10000000;
+    tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000;
 
   /* Calculate the response len */
   len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN;