From b59da4fc9c35b9def682294de1c521b32cd859e9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 22 Dec 2015 23:54:56 -0800 Subject: Adjusted scanner for link url. This fixes the heap buffer overflow reported in #82. Closes #82. --- 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 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; } */ } -- cgit v1.2.3