vauth/cleartext: fix integer overflow check 55/191055/1
authorDaniel Stenberg <daniel@haxx.se>
Tue, 20 Mar 2018 14:15:14 +0000 (15:15 +0100)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 11 Oct 2018 05:40:39 +0000 (11:10 +0530)
commit17bd33bb4d935e491856bd99c1cd7176f49c76c8
treea9d20a4cf324ba9a9567adad36cd6570cc67936d
parente44cb134f9d4a71a2d529d4eebfcdf318dda80ea
vauth/cleartext: fix integer overflow check

Make the integer overflow check not rely on the undefined behavior that
a size_t wraps around on overflow.

Detected by lgtm.com
Closes #2408

Backported patch details:-

Link: https://github.com/curl/curl/commit/c1366571b609407cf0d4d9f4a2769d29e1313151.patch
Change-Id: Ib0c92fac4733910c2060e4af105060fe98b396ca
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
lib/curl_ntlm_core.c
lib/curl_setup.h
lib/vauth/cleartext.c