From 7c7aadf91dcfb71307d38a9cbbf7726fd5a63c91 Mon Sep 17 00:00:00 2001 From: Xavier Mendez Date: Sat, 16 May 2015 20:29:31 +0200 Subject: [PATCH] Prevent out of bounds read --- src/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 99596e95..b057d297 100644 --- a/src/document.c +++ b/src/document.c @@ -2231,7 +2231,7 @@ parse_table_row( 2) The next pipe is right after the current one, i.e. empty cell. For case 1, we skip to the end of line; for case 2 we just continue. */ - if (len == 0 && data[i] != '|') + if (len == 0 && i < size && data[i] != '|') len = size - i; i += len;