Skip to content

Commit

Permalink
pythongh-106693: Explicitly mark ob_sval as unsigned char to avoid UB
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed Jul 17, 2023
1 parent 3e23fa7 commit 16961d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Include/cpython/bytesobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
typedef struct {
PyObject_VAR_HEAD
Py_DEPRECATED(3.11) Py_hash_t ob_shash;
char ob_sval[1];
unsigned char ob_sval[1];

/* Invariants:
* ob_sval contains space for 'ob_size+1' elements.
Expand Down

0 comments on commit 16961d0

Please sign in to comment.