diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-11-25 23:36:00 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2014-12-03 01:33:00 +0100 |
commit | 0e261892c7f5f4a3bb1db7d3c8b35bb603cdaaa0 (patch) | |
tree | 45ce4385064d181fbe7e99503d68fd0dcc217412 /source/fitz | |
parent | 16db810d3a6733aff2ffecde0019836b9ac23673 (diff) | |
download | mupdf-0e261892c7f5f4a3bb1db7d3c8b35bb603cdaaa0.tar.xz |
Don't automatically trim buffer during fz_keep_buffer.
It's surprising and may cause unexpected effects for code that may have
saved pointers to the underlying data in read only buffers, such as
fz_new_image_from_buffer.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/buffer.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index c4017392..acfdc20a 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -44,12 +44,7 @@ fz_buffer * fz_keep_buffer(fz_context *ctx, fz_buffer *buf) { if (buf) - { - if (buf->refs == 1 && buf->cap > buf->len+1) - fz_resize_buffer(ctx, buf, buf->len); buf->refs ++; - } - return buf; } |