summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hiodev.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index 98001e99a6a8..48d105ff23ed 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -242,8 +242,12 @@ int HStreamIODev::skipBlock(int size)
else{
int remain = size;
while(remain){
- if( remain > BUFSIZE )
- remain -= GZREAD(rBuf, BUFSIZE);
+ if( remain > BUFSIZE ) {
+ int read = GZREAD(rBuf, BUFSIZE);
+ remain -= read;
+ if (read != BUFSIZE)
+ break;
+ }
else{
remain -= GZREAD(rBuf, remain);
break;