elm_cnp: allocate space for null terminator in _wl_targets_converter
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 28 Feb 2017 23:23:03 +0000 (17:23 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Tue, 28 Feb 2017 23:23:03 +0000 (17:23 -0600)
strcat needs room for a string terminator.

src/lib/elementary/elm_cnp.c

index 5a32ad5..2954867 100644 (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++)