diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-06-07 13:24:26 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-06-07 13:24:26 -0700 |
commit | 802270f434a72935ba75c725b3cadcae4f478735 (patch) | |
tree | b045b8831ac4c691ce90c41efa8e04b5330918da /src/houdini_html_e.c | |
parent | 3adc586d9d7539e4d33f737110ffd4e236379099 (diff) | |
parent | fdfa1e4bedf95691389efb9991ac8a6a4599c158 (diff) |
Merge pull request #56 from nwellnhof/bufsize_t
Safer handling of string buffer sizes and indices
Diffstat (limited to 'src/houdini_html_e.c')
-rw-r--r-- | src/houdini_html_e.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/houdini_html_e.c b/src/houdini_html_e.c index 1a4c3e1..7f4b91f 100644 --- a/src/houdini_html_e.c +++ b/src/houdini_html_e.c @@ -45,9 +45,9 @@ static const char *HTML_ESCAPES[] = { }; int -houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, size_t size, int secure) +houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, bufsize_t size, int secure) { - size_t i = 0, org, esc = 0; + bufsize_t i = 0, org, esc = 0; while (i < size) { org = i; @@ -75,7 +75,7 @@ houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src, size_t size, int secu } int -houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, size_t size) +houdini_escape_html(cmark_strbuf *ob, const uint8_t *src, bufsize_t size) { return houdini_escape_html0(ob, src, size, 1); } |