diff options
| author | Mattias EngdegÄrd | 2023-03-10 17:10:30 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-03-11 10:21:23 +0100 |
| commit | b8e7061232f9a5b06af70031dcc4b48c6575a364 (patch) | |
| tree | 357abc8cfd14a58874b58e6a89f50e8dfe4320b4 /java | |
| parent | c6bfffa9fe1af7f4f806e5533ba5f3c33476cf9a (diff) | |
| download | emacs-b8e7061232f9a5b06af70031dcc4b48c6575a364.tar.gz emacs-b8e7061232f9a5b06af70031dcc4b48c6575a364.zip | |
Remove recursion from character escape handling in reader
This cures a C stack overflow when reading certain long (crafted)
strings (bug#62039) and improves performance of reading escaped
characters in character and string literals.
Reported by Bruno Haible.
* src/lread.c (invalid_escape_syntax_error): New.
(read_escape): Rename to...
(read_char_escape): ...this. Remove recursion. Pass read-ahead char
as argument. Improve code performance and clarity.
(read_char_literal, read_string_literal): Update calls.
* test/src/lread-tests.el (lread-char-modifiers)
(lread-many-modifiers): Add test cases.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions