diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-22 23:54:56 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-22 23:54:56 -0800 |
commit | b59da4fc9c35b9def682294de1c521b32cd859e9 (patch) | |
tree | 0a2a20ea6e66b8d9aece746d8180194be66c502e /src/scanners.re | |
parent | a7d9e7daf6e9798267ee5d32a53a03f80c19410a (diff) |
Adjusted scanner for link url.
This fixes the heap buffer overflow reported in #82.
Closes #82.
Diffstat (limited to 'src/scanners.re')
-rw-r--r-- | src/scanners.re | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scanners.re b/src/scanners.re index 61026f6..00a0b12 100644 --- a/src/scanners.re +++ b/src/scanners.re @@ -216,7 +216,7 @@ bufsize_t _scan_link_url(const unsigned char *p) const unsigned char *start = p; /*!re2c [ \r\n]* [<] ([^<>\r\n\\\x00] | escaped_char | [\\])* [>] { return (bufsize_t)(p - start); } - [ \r\n]* (reg_char+ | escaped_char | in_parens_nosp | [\\][^()])* { return (bufsize_t)(p - start); } + [ \r\n]* (reg_char+ | escaped_char | [\\] | in_parens_nosp)* { return (bufsize_t)(p - start); } .? { return 0; } */ } |