Skip to content

Commit

Permalink
Prevent out of bounds read
Browse files Browse the repository at this point in the history
  • Loading branch information
mildsunrise committed May 16, 2015
1 parent d01eba9 commit 7c7aadf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7c7aadf

Please sign in to comment.