summaryrefslogtreecommitdiff
path: root/src/cryptography/utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2023-03-24 21:09:42 -0400
committerGitHub <noreply@github.com>2023-03-25 09:09:42 +0800
commit9dd0b26c48f567d5a7c4a0bc9f45ef2176a2d4a4 (patch)
treeea56241628a144f25ffb3d202c7b64b5774f42d1 /src/cryptography/utils.py
parent45e37718098edca2c5ac2135394bcf17fd7982f0 (diff)
downloadcryptography-40.0.1.tar.gz
Backport fix for 40.0.1 (#8603)40.0.1
* Fix handling very large pointer values (32-bit) (#8602) * Changelog and backport fo 40.0.1
Diffstat (limited to 'src/cryptography/utils.py')
-rw-r--r--src/cryptography/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py
index a84069f1c..1a2d490a2 100644
--- a/src/cryptography/utils.py
+++ b/src/cryptography/utils.py
@@ -47,7 +47,7 @@ def _extract_buffer_length(obj: typing.Any) -> typing.Tuple[int, int]:
from cryptography.hazmat.bindings._rust import _openssl
buf = _openssl.ffi.from_buffer(obj)
- return int(_openssl.ffi.cast("intptr_t", buf)), len(buf)
+ return int(_openssl.ffi.cast("uintptr_t", buf)), len(buf)
class InterfaceNotImplemented(Exception):