Function inflateCopy() sets the destination stream as a complete copy of the source stream, returns Z_MEM_ERROR if there is not enough memory, and returns Z_STREAM_ERROR if the source stream state is inconsistent. However, as shown in the following code, several missing error checks take place.
https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/mat.c#L1427
Hi,
Function inflateCopy() sets the destination stream as a complete copy of the source stream, returns Z_MEM_ERROR if there is not enough memory, and returns Z_STREAM_ERROR if the source stream state is inconsistent. However, as shown in the following code, several missing error checks take place. https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/mat.c#L1427
================================================================================
In the following code, though the return values of function inflateCopy() are assigned to the variables. However, the variables are not checked as error codes. https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/read_data.c#L674 https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/read_data.c#L1041 https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/read_data.c#L1180
================================================================================
Furthermore, the return value of function inflateCopy() from other call sites are all checked. See the following code, for example, https://github.com/tbeu/matio/blob/7a1831b94a73f2cd665bd48f65c8516509d0740e/src/mat5.c#L4403-L4407