summaryrefslogtreecommitdiff
path: root/stream/stm_misc.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2008-04-25 21:27:06 +0200
committerTor Andersson <tor@ghostscript.com>2008-04-25 21:27:06 +0200
commit06ec05447f3926a304b682b35fb3723fef249a2b (patch)
treebd0b3b2a43ea6638dc1e3993c95bb14ced279ccf /stream/stm_misc.c
parent319e57ddaf303bdc11de0ff0960576cb15519112 (diff)
downloadmupdf-06ec05447f3926a304b682b35fb3723fef249a2b.tar.xz
Fix potential error in fz_readall realloc buffer trimming.
Diffstat (limited to 'stream/stm_misc.c')
-rw-r--r--stream/stm_misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/stm_misc.c b/stream/stm_misc.c
index 22d993d1..1098c016 100644
--- a/stream/stm_misc.c
+++ b/stream/stm_misc.c
@@ -124,10 +124,10 @@ fz_readall(fz_buffer **bufp, fz_stream *stm)
real->refs = 1;
real->ownsdata = 1;
- real->bp = buf;
- real->rp = buf;
- real->wp = buf + pos;
- real->ep = buf + pos;
+ real->bp = newbuf;
+ real->rp = newbuf;
+ real->wp = newbuf + pos;
+ real->ep = newbuf + pos;
real->eof = 1;
*bufp = real;