summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-10 16:56:13 +0100
committerAndras Timar <andras.timar@collabora.com>2017-08-21 09:00:33 +0200
commitf9bae4b579c210661d28212a9ef05f3163a4925a (patch)
tree42bfa7c94c6d893311e58e227103765f2c3f2129 /hwpfilter
parent38f5de12bade632d5c167ccb40bfbdd28761a49c (diff)
ofz#2899 increment pos before check, like all the other cases
Change-Id: Id49f747e36f767a3e82fc3610959eb94015a93d7 Reviewed-on: https://gerrit.libreoffice.org/40986 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6ca0958555f24e2a384740669adceb6cf3c7e3b8)
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/drawing.h2
-rw-r--r--hwpfilter/source/hiodev.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 1967ddffed1c..52a67be5365d 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -318,8 +318,6 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, unsigned short * link_info)
static HWPDrawingObject *LoadDrawingObject(void)
{
- fprintf(stderr, "LoadDrawingObject\n");
-
HWPDrawingObject *hdo, *head, *prev;
unsigned short link_info;
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index 45ccb987bcd5..da02aadc800e 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -308,9 +308,10 @@ bool HMemIODev::setCompressed(bool )
bool HMemIODev::read1b(unsigned char &out)
{
+ ++pos;
if (pos <= length)
{
- out = ptr[pos++];
+ out = ptr[pos - 1];
return true;
}
return false;