From 7a439812b2226c1e3b203ec603f05b39d159f91e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 28 Dec 2016 13:20:16 +0100 Subject: Fix potential buffer overrun when decoding UTF-16 in XML parser. --- include/mupdf/fitz/string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/mupdf/fitz/string.h b/include/mupdf/fitz/string.h index 358701d1..c9c20c3d 100644 --- a/include/mupdf/fitz/string.h +++ b/include/mupdf/fitz/string.h @@ -79,6 +79,11 @@ void fz_format_output_path(fz_context *ctx, char *path, size_t size, const char */ char *fz_cleanname(char *name); +/* + FZ_UTFMAX: Maximum number of bytes in a decoded rune (maximum length returned by fz_chartorune). +*/ +enum { FZ_UTFMAX = 4 }; + /* fz_chartorune: UTF8 decode a single rune from a sequence of chars. -- cgit v1.2.3