summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/krb5.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-20 20:40:49 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-20 20:40:49 (GMT)
commite3dc4df9b95272037d27be25ae5ef030ffd83fa4 (patch)
tree6132bc02d5204bd988b32ee8ab06053ec7c0e4c4 /Utilities/cmcurl/lib/krb5.c
parent4e6c3cd93bc870f44442e6d7e59896bc6d86ce25 (diff)
parente8bff971d9d835a65bcb1711e7214afe37b238e0 (diff)
downloadCMake-e3dc4df9b95272037d27be25ae5ef030ffd83fa4.zip
CMake-e3dc4df9b95272037d27be25ae5ef030ffd83fa4.tar.gz
CMake-e3dc4df9b95272037d27be25ae5ef030ffd83fa4.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2023-03-20 (b16d1fa8)
Diffstat (limited to 'Utilities/cmcurl/lib/krb5.c')
-rw-r--r--Utilities/cmcurl/lib/krb5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/krb5.c b/Utilities/cmcurl/lib/krb5.c
index 3cd64e1..a71779a 100644
--- a/Utilities/cmcurl/lib/krb5.c
+++ b/Utilities/cmcurl/lib/krb5.c
@@ -721,8 +721,7 @@ int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn,
return 0;
if(buf[3] != '-')
- /* safe to ignore return code */
- (void)sscanf(buf, "%d", &ret_code);
+ ret_code = atoi(buf);
if(buf[decoded_len - 1] == '\n')
buf[decoded_len - 1] = '\0';
@@ -765,8 +764,9 @@ static int sec_set_protection_level(struct Curl_easy *data)
pbsz = strstr(data->state.buffer, "PBSZ=");
if(pbsz) {
- /* ignore return code, use default value if it fails */
- (void)sscanf(pbsz, "PBSZ=%u", &buffer_size);
+ /* stick to default value if the check fails */
+ if(!strncmp(pbsz, "PBSZ=", 5) && ISDIGIT(pbsz[5]))
+ buffer_size = atoi(&pbsz[5]);
if(buffer_size < conn->buffer_size)
conn->buffer_size = buffer_size;
}