diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-10 16:56:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-25 19:38:24 +0200 |
commit | 682f05f0b04f0f6949fbd220140964006dd7cbe6 (patch) | |
tree | b813ae3f00eac77888c73f3894338355cf13fae9 /hwpfilter | |
parent | ofz#2877: crash in SVTB16Short (diff) | |
download | core-682f05f0b04f0f6949fbd220140964006dd7cbe6.tar.gz core-682f05f0b04f0f6949fbd220140964006dd7cbe6.zip |
ofz#2899 increment pos before check, like all the other cases
Change-Id: Id49f747e36f767a3e82fc3610959eb94015a93d7
Reviewed-on: https://gerrit.libreoffice.org/40984
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/drawing.h | 2 | ||||
-rw-r--r-- | hwpfilter/source/hiodev.cxx | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h index 4f990b0de813..0b8191a24a5b 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 4df1344ea8df..91477a265d72 100644 --- a/hwpfilter/source/hiodev.cxx +++ b/hwpfilter/source/hiodev.cxx @@ -305,9 +305,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; |