diff --git a/sdk/lib/rtl/memstream.c b/sdk/lib/rtl/memstream.c index 0549424ca45..8fe4169fb16 100644 --- a/sdk/lib/rtl/memstream.c +++ b/sdk/lib/rtl/memstream.c @@ -185,7 +185,8 @@ RtlReadMemoryStream( Stream->Current = (PUCHAR)Stream->Current + CopyLength; - *BytesRead = CopyLength; + if (BytesRead) + *BytesRead = CopyLength; return S_OK; }