Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix undefined behaviour in C code of null pointer arithmetic.
2 changes: 1 addition & 1 deletion Parser/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end)
} while (c == ' ' || c == '\t' || c == '\014');

/* Set start of current token */
tok->start = tok->cur - 1;
tok->start = tok->cur == NULL ? NULL : tok->cur - 1;

/* Skip comment, unless it's a type comment */
if (c == '#') {
Expand Down