CID 1206831 Dereference after null check

BytesRead is an optional out parameter and must be checked before being written to.
This commit is contained in:
Samuel Serapion 2017-10-20 14:00:32 -04:00 committed by Pierre Schweitzer
parent abb6ad90f5
commit b3b2a23f05

View file

@ -185,7 +185,8 @@ RtlReadMemoryStream(
Stream->Current = (PUCHAR)Stream->Current + CopyLength;
*BytesRead = CopyLength;
if (BytesRead)
*BytesRead = CopyLength;
return S_OK;
}