Merge pull request #2805 from jsorg71/valgrind_font

fix valgrind warning on font
This commit is contained in:
matt335672 2023-09-26 09:01:57 +01:00 committed by GitHub
commit 98ad496072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,7 +261,7 @@ xrdp_font_create(struct xrdp_wm *wm, unsigned int dpi)
* that it can be added to the glyph cache if required */
f->width = 1;
f->height = 1;
f->data = (char *)g_malloc(1, 1);
f->data = (char *)g_malloc(FONT_DATASIZE(f), 1);
}
else if (s_check_rem(s, datasize))
{