fix possible buffer overflow in module config dialog

SVN revision: 80832
This commit is contained in:
Mike Blumenkrantz 2012-12-13 12:03:41 +00:00
parent 8f1f764359
commit 6d0a11236f
1 changed files with 1 additions and 3 deletions

View File

@ -463,9 +463,7 @@ _cftype_new_from_key(const char *key)
memcpy(name, key, key_len + 1);
name[0] = toupper(name[0]);
memcpy(icon, "enlightenment/", sizeof("enlightenment/") - 1);
memcpy(icon + sizeof("enlightenment/") - 1, key, key_len + 1);
snprintf(icon, sizeof(icon), "enlightenment/%s", key);
return _cftype_new(key, name, icon);
}