summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2023-09-20 00:32:15 +0200
committerAlbert Astals Cid <aacid@kde.org>2023-09-20 00:32:31 +0200
commit77573e1a706f861ca4677ea36dbdcc0a9fb50a99 (patch)
tree9a321857edfcc4c7e7345c57722cdbd2127d5ad6
parente6be3e11ada80291d5f9aa74dbe1604ff20c7cd1 (diff)
Fix DCTStream getting stuck in some broken files
Fixes #1430
-rw-r--r--poppler/DCTStream.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index 70dd0c73..cff9101d 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net>
-// Copyright 2005-2010, 2012, 2017, 2020-2022 Albert Astals Cid <aacid@kde.org>
+// Copyright 2005-2010, 2012, 2017, 2020-2023 Albert Astals Cid <aacid@kde.org>
// Copyright 2009 Ryszard Trojnacki <rysiek@menel.com>
// Copyright 2010 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright 2011 Daiki Ueno <ueno@unixuser.org>
@@ -33,10 +33,10 @@ static boolean str_fill_input_buffer(j_decompress_ptr cinfo)
} else {
c = src->str->getChar();
}
+ src->buffer = c;
+ src->pub.next_input_byte = &src->buffer;
+ src->pub.bytes_in_buffer = 1;
if (c != EOF) {
- src->buffer = c;
- src->pub.next_input_byte = &src->buffer;
- src->pub.bytes_in_buffer = 1;
return TRUE;
} else {
return FALSE;