nul terminate string from ecore_x_randr_output_name_get

This commit is contained in:
Mike Blumenkrantz 2014-01-21 14:58:06 -05:00
parent cff1a9a59f
commit 8cbd7c1622
1 changed files with 2 additions and 1 deletions

View File

@ -2206,8 +2206,9 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
{
if (info->name)
{
ret = malloc(info->nameLen);
ret = malloc(info->nameLen + 1);
memcpy(ret, info->name, info->nameLen);
ret[info->nameLen] = 0;
if (len) *len = info->nameLen;
}