diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-10-11 16:36:19 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-10-12 15:18:07 +0200 |
commit | b5c4bee884e9c4a5f988d21cec22abd9ddd0edcf (patch) | |
tree | a8cb1e93a0da15915480862031a683aef9dce6f1 /include | |
parent | 992c7c6cf15813760f4582682f5a48daba5d4239 (diff) | |
download | mupdf-b5c4bee884e9c4a5f988d21cec22abd9ddd0edcf.tar.xz |
Fix bug in murun when creating buffers from strings.
The code only worked for string literals, not garbage collected or
short strings.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/buffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mupdf/fitz/buffer.h b/include/mupdf/fitz/buffer.h index 54c1078b..251a5943 100644 --- a/include/mupdf/fitz/buffer.h +++ b/include/mupdf/fitz/buffer.h @@ -69,6 +69,12 @@ fz_buffer *fz_new_buffer_from_data(fz_context *ctx, unsigned char *data, size_t fz_buffer *fz_new_buffer_from_shared_data(fz_context *ctx, const unsigned char *data, size_t size); /* + fz_new_buffer_from_copied_data: Create a new buffer containing a copy of the passed data. +*/ +fz_buffer * +fz_new_buffer_from_copied_data(fz_context *ctx, const unsigned char *data, size_t size); + +/* fz_new_buffer_from_base64: Create a new buffer with data decoded from a base64 input string. */ fz_buffer *fz_new_buffer_from_base64(fz_context *ctx, const char *data, size_t size); |