From c9004ffe784577c39b680096883bc8f90524bf8a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 11 Jan 2016 11:04:15 -0800 Subject: Fixed edge case with escaped parens in link destination. Closes #97. This was also checked against the #82 case with asan. --- src/scanners.re | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scanners.re') 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; } */ } -- cgit v1.2.3