diff options
author | Phil Turnbull <philipturnbull@github.com> | 2018-02-16 13:25:56 -0500 |
---|---|---|
committer | Phil Turnbull <philipturnbull@github.com> | 2018-02-20 12:25:04 -0500 |
commit | e489ba4ccb92af53ea823223481005384fad5e14 (patch) | |
tree | c9c703979f23d0ec54c237cb9846f6f05907c26c /data | |
parent | a5c83d7a426bda38aac838f9815664f6189d3404 (diff) |
Check for empty buffer when rendering
For empty documents, `->size` is zero so
`renderer.buffer->ptr[renderer.buffer->size - 1]` will cause an out-of-bounds
read. Empty buffers always point to the global `cmark_strbuf__initbuf` buffer
so we read `cmark_strbuf__initbuf[-1]`.
Diffstat (limited to 'data')
0 files changed, 0 insertions, 0 deletions