#fixed code
                                @Test
    public void testSkipPastEnd() throws Throwable {
        InputStream ins = new ByteArrayInputStream(StringUtils.getBytesIso8859_1(ENCODED_FOO));
        Base32InputStream b32stream = new Base32InputStream(ins);
        // due to CODEC-130, skip now skips correctly decoded characters rather than encoded
        assertEquals(3, b32stream.skip(10));
        // End of stream reached
        assertEquals(-1, b32stream.read());
        assertEquals(-1, b32stream.read());
        b32stream.close();
}
#vulnerable code 
                                @Test
    public void testSkipPastEnd() throws Throwable {
        InputStream ins = new ByteArrayInputStream(StringUtils.getBytesIso8859_1(ENCODED_FOO));
        Base32InputStream b32stream = new Base32InputStream(ins);
        // due to CODEC-130, skip now skips correctly decoded characters rather than encoded
        assertEquals(3, b32stream.skip(10));
        // End of stream reached
        assertEquals(-1, b32stream.read());
        assertEquals(-1, b32stream.read());
    } 
                            #location 8 
                            #vulnerability type RESOURCE_LEAK