all repos — grayfriday @ 123a149ec3552a9eafd680ffbb02838a0bd76fb8

blackfriday fork with a few changes

missing bounds check
Russ Ross russ@russross.com
Sun, 03 Jul 2011 10:30:28 -0600
commit

123a149ec3552a9eafd680ffbb02838a0bd76fb8

parent

bd60e3691bab374601f6fb1b36138db8ab435e05

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M inline.goinline.go

@@ -667,14 +667,14 @@ for i < len(data) && (isalnum(data[i]) || data[i] == '.' || data[i] == '+' || data[i] == '-') {

i++ } - if i > 1 && data[i] == '@' { + if i > 1 && i < len(data) && data[i] == '@' { if j = isMailtoAutoLink(data[i:]); j != 0 { *autolink = LINK_TYPE_EMAIL return i + j } } - if i > 2 && data[i] == ':' { + if i > 2 && i < len(data) && data[i] == ':' { *autolink = LINK_TYPE_NORMAL i++ }