projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
917636b
)
compose: fix infinite loop in parser on some inputs
author
Ran Benita
<ran234@gmail.com>
Mon, 12 Mar 2018 07:43:55 +0000
(09:43 +0200)
committer
Ran Benita
<ran234@gmail.com>
Mon, 30 Jul 2018 07:35:10 +0000
(10:35 +0300)
The parser would enter an infinite loop if an unterminated keysym
literal occurs at EOF.
Found with the afl fuzzer.
Signed-off-by: Ran Benita <ran234@gmail.com>
src/compose/parser.c
patch
|
blob
|
history
diff --git
a/src/compose/parser.c
b/src/compose/parser.c
index
40c9470
..
439d404
100644
(file)
--- a/
src/compose/parser.c
+++ b/
src/compose/parser.c
@@
-144,7
+144,7
@@
skip_more_whitespace_and_comments:
/* LHS Keysym. */
if (chr(s, '<')) {
- while (peek(s) != '>' && !eol(s))
+ while (peek(s) != '>' && !eol(s)
&& !eof(s)
)
buf_append(s, next(s));
if (!chr(s, '>')) {
scanner_err(s, "unterminated keysym literal");