diff options
author | Sam James <sam@gentoo.org> | 2022-09-21 14:18:08 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-02 04:31:25 +0100 |
commit | a529111f77ff46f4836fe7312e70953bc16587cf (patch) | |
tree | 9dc3924cb1a6ef3ef853b7bb45f735365e0b4e6d /base/gxclread.c | |
parent | Import Ghostscript 9.56.1 (diff) | |
download | ghostscript-gpl-patches-ghostscript-10.tar.gz ghostscript-gpl-patches-ghostscript-10.tar.bz2 ghostscript-gpl-patches-ghostscript-10.zip |
Import Ghostscript 10.0ghostscript-10.0ghostscript-10
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'base/gxclread.c')
-rw-r--r-- | base/gxclread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/gxclread.c b/base/gxclread.c index 03945e81..b17d5a1e 100644 --- a/base/gxclread.c +++ b/base/gxclread.c @@ -294,6 +294,12 @@ buffer_segment_index(const stream_band_read_state *ss, uint buffer_offset, uint return i; } } + /* Now cope with the case where we've read exactly to the end of the buffer. + * There might be more data still to come. */ + if (buffer_offset == offset) { + *poffset0 = offset0; + return i-1; + } #ifdef EXTRA_OFFSET_MAP_DEBUGGING dmlprintf1(ss->local_memory, "buffer_segment_index fail: buffer_offset=%d not found\n", buffer_offset); exit(1); |