Commit faf1485e authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

winspool.drv: Check ptr for being NULL (Coverity).

parent 6a193392
......@@ -3337,7 +3337,7 @@ static BOOL WINSPOOL_GetDevModeFromReg(HKEY hkey, LPCWSTR ValueName,
if (ptr && ((DEVMODEA*)ptr)->dmSize < sizeof(DEVMODEA))
((DEVMODEA*)ptr)->dmSize = sizeof(DEVMODEA);
sz += (CCHDEVICENAME + CCHFORMNAME);
if(buflen >= sz) {
if (ptr && (buflen >= sz)) {
DEVMODEW *dmW = GdiConvertToDevmodeW((DEVMODEA*)ptr);
memcpy(ptr, dmW, sz);
HeapFree(GetProcessHeap(),0,dmW);
......
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