#fixed code
                                @Test(expected = MalformedChunkCodingException.class)
    public void testCorruptChunkedInputStreamInvalidFooter() throws IOException {
        final String s = "1\r\n0\r\n0\r\nstuff\r\n";
        final InputStream in = new ChunkedInputStream(
                new SessionInputBufferMock(s, Consts.ISO_8859_1));
        in.read();
        in.read();
        in.close();
    }
#vulnerable code 
                                @Test(expected = MalformedChunkCodingException.class)
    public void testCorruptChunkedInputStreamInvalidFooter() throws IOException {
        final String s = "1\r\n0\r\n0\r\nstuff\r\n";
        final InputStream in = new ChunkedInputStream(
                new SessionInputBufferMock(s, Consts.ISO_8859_1));
        in.read();
        in.read();
    } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK