Commit 79ad9cbc authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

cabinet: Check buffer size before copying in NONEfdi_decomp.

Check that the data will fit into the fixed sized buffer CAB(outbuf) and return an error if not before copying.
parent 2b5a59c0
......@@ -911,6 +911,7 @@ static int LZXfdi_init(int window, fdi_decomp_state *decomp_state) {
static int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
{
if (inlen != outlen) return DECR_ILLEGALDATA;
if (outlen > CAB_BLOCKMAX) return DECR_DATAFORMAT;
memcpy(CAB(outbuf), CAB(inbuf), (size_t) inlen);
return DECR_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment