diff options
author | Xavier Mendez <me@jmendeth.com> | 2015-05-16 20:29:31 +0200 |
---|---|---|
committer | Xavier Mendez <me@jmendeth.com> | 2015-05-16 20:29:31 +0200 |
commit | 7c7aadf91dcfb71307d38a9cbbf7726fd5a63c91 (patch) | |
tree | f98b2a2040f40dc09d8274ded1e3865d533850c9 | |
parent | d01eba91d23cea88c34ca64ece5b0995167e2c48 (diff) | |
download | rust-hoedown-7c7aadf91dcfb71307d38a9cbbf7726fd5a63c91.tar.gz |
Prevent out of bounds read
-rw-r--r-- | src/document.c | 2 |
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; |