diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-01-11 11:04:15 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-01-11 11:24:05 -0800 |
commit | c9004ffe784577c39b680096883bc8f90524bf8a (patch) | |
tree | 295382e6bd8bdaba0123d2368d98d2b904f579fd /src/scanners.re | |
parent | 10d6247fbb2ae7f9c3e4e7e75384bcb990d83464 (diff) |
Fixed edge case with escaped parens in link destination.
Closes #97.
This was also checked against the #82 case with asan.
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 a7548ac..8b1c91e 100644 --- a/src/scanners.re +++ b/src/scanners.re @@ -215,7 +215,7 @@ bufsize_t _scan_link_url(const unsigned char *p) const unsigned char *start = p; /*!re2c [ \r\n]* [<] ([^<> \t\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 | [\\] [^() \t\v\f\r\n] | in_parens_nosp)* [\\]? { return (bufsize_t)(p - start); } .? { return 0; } */ } |