#include "urldata.h"
#include "sendf.h"
#include "rawstr.h"
+#include "warnless.h"
#include "curl_base64.h"
#include "http_negotiate.h"
#include "curl_memory.h"
out_buff_desc.cBuffers = 1;
out_buff_desc.pBuffers = &out_sec_buff;
- out_sec_buff.cbBuffer = neg_ctx->max_token_length;
+ out_sec_buff.cbBuffer = curlx_uztoul(neg_ctx->max_token_length);
out_sec_buff.BufferType = SECBUFFER_TOKEN;
out_sec_buff.pvBuffer = neg_ctx->output_token;
in_buff_desc.cBuffers = 1;
in_buff_desc.pBuffers = &in_sec_buff;
- in_sec_buff.cbBuffer = input_token_len;
+ in_sec_buff.cbBuffer = curlx_uztoul(input_token_len);
in_sec_buff.BufferType = SECBUFFER_TOKEN;
in_sec_buff.pvBuffer = input_token;
}
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
#endif
}
+/*
+** unsigned size_t to unsigned long
+*/
+
+unsigned long curlx_uztoul(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
/*
** signed long to signed int
*/
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
int curlx_uztosi(size_t uznum);
+unsigned long curlx_uztoul(size_t uznum);
+
int curlx_sltosi(long slnum);
unsigned int curlx_sltoui(long slnum);