elm_cnp: allocate space for null terminator in _wl_targets_converter

strcat needs room for a string terminator.
This commit is contained in:
Derek Foreman 2017-02-28 17:23:03 -06:00
parent d8edf70c32
commit 7359f0be6e
1 changed files with 1 additions and 0 deletions

View File

@ -2484,6 +2484,7 @@ _wl_targets_converter(char *target, Wl_Cnp_Selection *sel EINA_UNUSED, void *dat
len += strlen(_atoms[i].name) + strlen(sep);
}
}
len++; //terminating null byte
aret = calloc(1, len * sizeof(char));
if (!aret) return EINA_FALSE;
for (i = 0; i < CNP_N_ATOMS; i++)