diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 20:47:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 20:49:08 +0000 |
commit | 425572b9d510cee805dc4160d7e81887d8f27577 (patch) | |
tree | d3c1455ba400918e4a47cddf9ba2a37c462244dc /hwpfilter | |
parent | 6f3e24ad64dd40b3ef8def7d879ba395a16874a1 (diff) |
ofz: ReadBlock has to be HWPIDLen to be useful
Change-Id: Iaa349921972bb19b40bf68c6a3b0c7128cff4b8d
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index 33505c0f733e..2983ef045dd6 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -126,7 +126,7 @@ int HWPFile::Open(HStream * stream) char idstr[HWPIDLen]; - if (ReadBlock(idstr, HWPIDLen) <= 0 + if (ReadBlock(idstr, HWPIDLen) < HWPIDLen || HWP_V30 != (version = detect_hwp_version(idstr))) { return SetState(HWP_UNSUPPORTED_VERSION); |