summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2018-06-19 12:57:30 +0900
committerKoichiro IWAO <meta@vmeta.jp>2018-06-19 12:57:30 +0900
commiteda18428252aa5b12532387d236d06530c0d866d (patch)
tree49a32bed140e503133af525c7d2d8906bace6678
parent6e16b38ecc109bc889dcc1ea79a9ad436abd463a (diff)
downloadxrdp-proprietary-eda18428252aa5b12532387d236d06530c0d866d.tar.gz
xrdp-proprietary-eda18428252aa5b12532387d236d06530c0d866d.zip
sesman: add comments, no logic change
-rw-r--r--sesman/config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sesman/config.c b/sesman/config.c
index 796b9511..78949995 100644
--- a/sesman/config.c
+++ b/sesman/config.c
@@ -184,6 +184,7 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
/* if default_wm doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */
if (cf->default_wm[0] != '/')
{
+ /* sizeof operator returns string length including null terminator */
length = sizeof(XRDP_CFG_PATH) + g_strlen(g_cfg->default_wm) + 1; /* '/' */
buf = (char *)g_malloc(length, 0);
g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, g_cfg->default_wm);
@@ -204,6 +205,7 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
/* if reconnect_sh doesn't begin with '/', it's a relative path to XRDP_CFG_PATH */
if (cf->reconnect_sh[0] != '/')
{
+ /* sizeof operator returns string length including null terminator */
length = sizeof(XRDP_CFG_PATH) + g_strlen(g_cfg->reconnect_sh) + 1; /* '/' */
buf = (char *)g_malloc(length, 0);
g_sprintf(buf, "%s/%s", XRDP_CFG_PATH, g_cfg->reconnect_sh);