Skip to content

Commit 38b1d65

Browse files
committed
xrdp_keyboard.ini : Provide defaults
At present, in the unlikely event the xrdp_keyboard.ini file is damaged, sensible defaults are not provided for the values in the [defaults] section.
1 parent f1f2ce5 commit 38b1d65

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

xrdp/lang.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,9 +700,12 @@ xrdp_init_xkb_layout(struct xrdp_client_info *client_info)
700700

701701
if (section_found == -1)
702702
{
703-
g_memset(section_rdp_layouts, 0, sizeof(char) * 256);
704-
g_memset(section_layouts_map, 0, sizeof(char) * 256);
705703
// read default section
704+
strlcpy(section_rdp_layouts, "default_rdp_layouts",
705+
sizeof(section_rdp_layouts));
706+
strlcpy(section_layouts_map, "default_layouts_map",
707+
sizeof(section_layouts_map));
708+
706709
file_read_section(fd, "default", items, values);
707710
for (index = 0; index < items->count; index++)
708711
{

0 commit comments

Comments
 (0)