summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-11-05 15:05:13 (GMT)
committerGitHub <noreply@github.com>2024-11-05 15:05:13 (GMT)
commit0b67ce930a56c4ffd597b1a658ddcbacfb40e798 (patch)
treed94e43675e70b3a16c654190f37bc449a7e11633 /Modules/_ssl.c
parentbbfd9c92fa3e3d77a86c7858617eb3d09de44fd1 (diff)
downloadcpython-0b67ce930a56c4ffd597b1a658ddcbacfb40e798.zip
cpython-0b67ce930a56c4ffd597b1a658ddcbacfb40e798.tar.gz
cpython-0b67ce930a56c4ffd597b1a658ddcbacfb40e798.tar.bz2
gh-126433: Fix compiler warnings on 32-bit Windows (#126444)
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 54bac28..5223e21 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -4923,7 +4923,9 @@ static unsigned int psk_client_callback(SSL *s,
goto error;
}
- if (identity_len_ + 1 > max_identity_len || psk_len_ > max_psk_len) {
+ if ((size_t)identity_len_ + 1 > max_identity_len
+ || (size_t)psk_len_ > max_psk_len)
+ {
Py_DECREF(result);
goto error;
}
@@ -5036,7 +5038,7 @@ static unsigned int psk_server_callback(SSL *s,
goto error;
}
- if (psk_len_ > max_psk_len) {
+ if ((size_t)psk_len_ > max_psk_len) {
Py_DECREF(result);
goto error;
}