summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/document.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/document.c b/src/document.c
index 99596e9..b057d29 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;