mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
bpo-40998: Address compiler warnings found by ubsan (GH-20929)
Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
46f59ebd01
commit
07f2adedf0
4 changed files with 13 additions and 5 deletions
|
@ -69,6 +69,9 @@ decode_unicode_with_escapes(Parser *parser, const char *s, size_t len, Token *t)
|
|||
return NULL;
|
||||
}
|
||||
p = buf = PyBytes_AsString(u);
|
||||
if (p == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
end = s + len;
|
||||
while (s < end) {
|
||||
if (*s == '\\') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue