summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/buffer.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-10-11 16:36:19 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-10-12 15:18:07 +0200
commitb5c4bee884e9c4a5f988d21cec22abd9ddd0edcf (patch)
treea8cb1e93a0da15915480862031a683aef9dce6f1 /include/mupdf/fitz/buffer.h
parent992c7c6cf15813760f4582682f5a48daba5d4239 (diff)
downloadmupdf-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/mupdf/fitz/buffer.h')
-rw-r--r--include/mupdf/fitz/buffer.h6
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);