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 /source/tools/murun.c | |
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 'source/tools/murun.c')
-rw-r--r-- | source/tools/murun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c index dd93b138..5925ba4f 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -763,7 +763,7 @@ static fz_buffer *ffi_tobuffer(js_State *J, int idx) else { const char *str = js_tostring(J, idx); fz_try(ctx) - buf = fz_new_buffer_from_shared_data(ctx, (const unsigned char *)str, strlen(str)); + buf = fz_new_buffer_from_copied_data(ctx, (const unsigned char *)str, strlen(str)); fz_catch(ctx) rethrow(J); } |