From ab16c82cc732356290a3cb547df88aac49b6f8f5 Mon Sep 17 00:00:00 2001 From: Devin Torres Date: Wed, 22 Jan 2014 18:38:19 -0600 Subject: [PATCH] Explicity declare the escape tables as size UINT8_MAX+1 --- src/escape.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/escape.c b/src/escape.c index 70b64f2..b1039ed 100644 --- a/src/escape.c +++ b/src/escape.c @@ -31,7 +31,7 @@ * All other characters will be escaped to %XX. * */ -static const uint8_t HREF_SAFE[] = { +static const uint8_t HREF_SAFE[UINT8_MAX+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, @@ -127,7 +127,7 @@ hoedown_escape_href(hoedown_buffer *ob, const uint8_t *src, size_t size) * / --> / forward slash is included as it helps end an HTML entity * */ -static const uint8_t HTML_ESCAPE_TABLE[] = { +static const uint8_t HTML_ESCAPE_TABLE[UINT8_MAX+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 4,