elm_cnp: allocate space for null terminator in _wl_targets_converter
strcat needs room for a string terminator.
This commit is contained in:
parent
d8edf70c32
commit
7359f0be6e
|
@ -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 += strlen(_atoms[i].name) + strlen(sep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
len++; //terminating null byte
|
||||||
aret = calloc(1, len * sizeof(char));
|
aret = calloc(1, len * sizeof(char));
|
||||||
if (!aret) return EINA_FALSE;
|
if (!aret) return EINA_FALSE;
|
||||||
for (i = 0; i < CNP_N_ATOMS; i++)
|
for (i = 0; i < CNP_N_ATOMS; i++)
|
||||||
|
|
Loading…
Reference in New Issue