Commit bbe91045 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

iccvid: Guard against null pointer reference.

parent eb22539e
...@@ -872,6 +872,11 @@ static LRESULT ICCVID_Decompress( ICCVID_Info *info, ICDECOMPRESS *icd, DWORD si ...@@ -872,6 +872,11 @@ static LRESULT ICCVID_Decompress( ICCVID_Info *info, ICDECOMPRESS *icd, DWORD si
if( (info==NULL) || (info->dwMagic!=ICCVID_MAGIC) ) if( (info==NULL) || (info->dwMagic!=ICCVID_MAGIC) )
return ICERR_BADPARAM; return ICERR_BADPARAM;
if (info->cvinfo==NULL)
{
ERR("ICM_DECOMPRESS sent after ICM_DECOMPRESS_END\n");
return ICERR_BADPARAM;
}
width = icd->lpbiInput->biWidth; width = icd->lpbiInput->biWidth;
height = icd->lpbiInput->biHeight; height = icd->lpbiInput->biHeight;
...@@ -890,6 +895,11 @@ static LRESULT ICCVID_DecompressEx( ICCVID_Info *info, ICDECOMPRESSEX *icd, DWOR ...@@ -890,6 +895,11 @@ static LRESULT ICCVID_DecompressEx( ICCVID_Info *info, ICDECOMPRESSEX *icd, DWOR
if( (info==NULL) || (info->dwMagic!=ICCVID_MAGIC) ) if( (info==NULL) || (info->dwMagic!=ICCVID_MAGIC) )
return ICERR_BADPARAM; return ICERR_BADPARAM;
if (info->cvinfo==NULL)
{
ERR("ICM_DECOMPRESSEX sent after ICM_DECOMPRESS_END\n");
return ICERR_BADPARAM;
}
/* FIXME: flags are ignored */ /* FIXME: flags are ignored */
......
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