From 7359f0be6e80c818ea3067671fb5c84af5ec9aae Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 28 Feb 2017 17:23:03 -0600 Subject: [PATCH] elm_cnp: allocate space for null terminator in _wl_targets_converter strcat needs room for a string terminator. --- src/lib/elementary/elm_cnp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c index 5a32ad5..2954867 100644 --- a/src/lib/elementary/elm_cnp.c +++ b/src/lib/elementary/elm_cnp.c @@ -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++) -- 2.7.4