diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2016-12-31 02:25:16 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-12-30 18:25:16 -0700 |
commit | 4fbe344df43ed7f60a3d3a53981088334cb709fc (patch) | |
tree | f7f8264d06cb31024f169fda11c5d72821510c51 /src/inlines.h | |
parent | c4c1d59ca29aceb1c5919908ac97d9476264fd96 (diff) |
Change types for source map offsets (#174)
* Improve strbuf guarantees
Introduce BUFSIZE_MAX macro and make sure that the strbuf implementation
can handle strings up to this size.
* Abort early if document size exceeds internal limit
* Change types for source map offsets
Switch to size_t for the public API, making the public headers
C89-compatible again.
Switch to bufsize_t internally, reducing memory usage and improving
performance on 32-bit platforms.
* Make parser return NULL on internal index overflow
Make S_parser_feed set an error and ignore subsequent chunks if the
total input document size exceeds an internal limit. Make
cmark_parser_finish return NULL if an error was encountered. Add
public API functions to retrieve error code and error message.
strbuf overflow in renderers and OOM in parser or renderers still
cause an abort.
Diffstat (limited to 'src/inlines.h')
-rw-r--r-- | src/inlines.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inlines.h b/src/inlines.h index 8de31b1..8459794 100644 --- a/src/inlines.h +++ b/src/inlines.h @@ -14,7 +14,7 @@ cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title); void cmark_parse_inlines(cmark_mem *mem, cmark_node *parent, cmark_reference_map *refmap, int options, - cmark_source_map *source_map, uint64_t total_length); + cmark_source_map *source_map, bufsize_t total_length); bufsize_t cmark_parse_reference_inline(cmark_mem *mem, cmark_strbuf *input, cmark_reference_map *refmap, |