diff --git a/src/scratchpad/src/org/apache/poi/hslf/blip/EMF.java b/src/scratchpad/src/org/apache/poi/hslf/blip/EMF.java index 0de8cd744..4d7de5f75 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/blip/EMF.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/EMF.java @@ -76,7 +76,8 @@ public final class EMF extends Metafile { InputStream is = new ByteArrayInputStream( rawdata ); Header header = new Header(); header.read(rawdata, CHECKSUM_SIZE); - is.skip(header.getSize() + CHECKSUM_SIZE); + long len = is.skip(header.getSize() + CHECKSUM_SIZE); + assert(len == header.getSize() + CHECKSUM_SIZE); InflaterInputStream inflater = new InflaterInputStream( is ); byte[] chunk = new byte[4096]; diff --git a/src/scratchpad/src/org/apache/poi/hslf/blip/WMF.java b/src/scratchpad/src/org/apache/poi/hslf/blip/WMF.java index bd459c1d4..9dbc7f3bc 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/blip/WMF.java +++ b/src/scratchpad/src/org/apache/poi/hslf/blip/WMF.java @@ -46,7 +46,8 @@ public final class WMF extends Metafile { InputStream is = new ByteArrayInputStream( rawdata ); Header header = new Header(); header.read(rawdata, CHECKSUM_SIZE*uidInstanceCount); - is.skip(header.getSize() + CHECKSUM_SIZE*uidInstanceCount); + long len = is.skip(header.getSize() + CHECKSUM_SIZE*uidInstanceCount); + assert(len == header.getSize() + CHECKSUM_SIZE*uidInstanceCount); NativeHeader aldus = new NativeHeader(header.bounds); aldus.write(out); diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfHeader.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfHeader.java index a36cfd4d9..247f22bd8 100644 --- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfHeader.java +++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfHeader.java @@ -70,7 +70,8 @@ public class HwmfHeader { bytesLeft -= LittleEndianConsts.SHORT_SIZE; if (bytesLeft > 0) { - leis.skip(bytesLeft); + long len = leis.skip(bytesLeft); + assert(len == bytesLeft); } } }