jpeg-quantsmooth icon indicating copy to clipboard operation
jpeg-quantsmooth copied to clipboard

[Prevent NULL-ptr dereference] check return value jpeg_read_coefficients

Open the-shank opened this issue 1 year ago • 4 comments

jpeg_read_coefficents can return NULL in certain conditions. If we continue without checking the return value, this could lead to NULL-pointer dereference further down the execution.

This fix checks the return value of call to jpeg_read_coefficents and exits in case it is NULL.

the-shank avatar Dec 15 '22 00:12 the-shank