CVE-2022-23484

Add check for RAIL window text size
This commit is contained in:
matt335672 2022-12-07 10:03:24 +00:00
parent f2282db410
commit 7780fd4ccb

View File

@ -925,6 +925,12 @@ xrdp_mm_process_rail_update_window_text(struct xrdp_mm *self, struct stream *s)
g_memset(&rwso, 0, sizeof(rwso));
in_uint32_le(s, size); /* title size */
if (size < 0 || !s_check_rem(s, size))
{
LOG(LOG_LEVEL_ERROR, "%s : invalid window text size %d",
__func__, size);
return 1;
}
rwso.title_info = g_new(char, size + 1);
in_uint8a(s, rwso.title_info, size);
rwso.title_info[size] = 0;