Fixed stream advance before length checks
@@ -183,10 +183,10 @@ static UINT telemetry_process_message(telemetry_server* telemetry)
goto out;
}
+ Stream_Seek(s, BytesReturned);
if (!Stream_CheckAndLogRequiredLength(TAG, s, 2))
return ERROR_NO_DATA;
- Stream_SetLength(s, BytesReturned);
Stream_Read_UINT8(s, MessageId);
Stream_Read_UINT8(s, Length);
