[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

Pablo Galindo Salgado report at bugs.python.org
Sun Oct 25 17:12:48 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

The problem seems to be that when we do

const char *cur = strchr(p->tok->buf, '\n');
...

*(cur - 1) == '\\'

we don't check if "cur" is before at p->tok->buf (and therefore we cannot check the previous char)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42150>
_______________________________________


More information about the Python-bugs-list mailing list