e6cccc6
diff --git a/extract.c b/extract.c
e6cccc6
index a0a4929..9ef80b3 100644
e6cccc6
--- a/extract.c
e6cccc6
+++ b/extract.c
e6cccc6
@@ -2214,6 +2214,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
e6cccc6
     ulg eb_ucsize;
e6cccc6
     uch *eb_ucptr;
e6cccc6
     int r;
e6cccc6
+    ush method;
e6cccc6
 
e6cccc6
     if (compr_offset < 4)                /* field is not compressed: */
e6cccc6
         return PK_OK;                    /* do nothing and signal OK */
e6cccc6
@@ -2223,6 +2224,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata)
e6cccc6
          eb_size <= (compr_offset + EB_CMPRHEADLEN)))
e6cccc6
         return IZ_EF_TRUNC;               /* no compressed data! */
e6cccc6
 
e6cccc6
+    method = makeword(eb + (EB_HEADSIZE + compr_offset));
d2ca9d5
+    if ((method == STORED) && (eb_size != compr_offset + EB_CMPRHEADLEN + eb_ucsize))
e6cccc6
+        return PK_ERR;            /* compressed & uncompressed
e6cccc6
+                                   * should match in STORED
e6cccc6
+                                   * method */
e6cccc6
+
e6cccc6
     if (
e6cccc6
 #ifdef INT_16BIT
e6cccc6
         (((ulg)(extent)eb_ucsize) != eb_ucsize) ||