From 425572b9d510cee805dc4160d7e81887d8f27577 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 1 Mar 2017 20:47:59 +0000 Subject: ofz: ReadBlock has to be HWPIDLen to be useful Change-Id: Iaa349921972bb19b40bf68c6a3b0c7128cff4b8d --- hwpfilter/source/hwpfile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit