Skip to content

Commit 16961d0

Browse files
committed
gh-106693: Explicitly mark ob_sval as unsigned char to avoid UB
1 parent 3e23fa7 commit 16961d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/cpython/bytesobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
typedef struct {
66
PyObject_VAR_HEAD
77
Py_DEPRECATED(3.11) Py_hash_t ob_shash;
8-
char ob_sval[1];
8+
unsigned char ob_sval[1];
99

1010
/* Invariants:
1111
* ob_sval contains space for 'ob_size+1' elements.

0 commit comments

Comments
 (0)