From 71e463e31b4d69f4022d36bfc814592f56600793 Mon Sep 17 00:00:00 2001
From: akallabeth <akallabeth@posteo.net>
Date: Sun, 21 Apr 2024 13:56:13 +0200
Subject: [PATCH] [core,info] fix missing check in rdp_write_logon_info_v1

Origin: https://github.com/FreeRDP/FreeRDP/commit/71e463e31b4d69f4022d36bfc814592f56600793

---
 libfreerdp/core/info.c | 4 ++++
 1 file changed, 4 insertions(+)

--- a/libfreerdp/core/info.c
+++ b/libfreerdp/core/info.c
@@ -1322,6 +1322,10 @@ static BOOL rdp_write_logon_info_v1(wStr
 		return FALSE;
 
 	/* domain */
+	WINPR_ASSERT(info);
+	if (!info->domain || !info->username)
+		return FALSE;
+
 	ilen = ConvertToUnicode(CP_UTF8, 0, info->domain, -1, &wString, 0);
 
 	if (ilen < 0)

