Fix memory corruption in ecore_xcb_window.c::ecore_x_window_children_get

Function allocated reply->children_len bytes, and then copied
sizeof(Ecore_X_Window) * reply->childen_len bytes into the buffer, leading
to memory corruption.

SVN revision: 42624
This commit is contained in:
Mikhail Gusarov 2009-09-22 18:18:28 +00:00
parent bea22f22a4
commit 8b293c2209
1 changed files with 1 additions and 1 deletions

View File

@ -1416,7 +1416,7 @@ ecore_x_window_children_get(Ecore_X_Window window __UNUSED__,
reply = _ecore_xcb_reply_get();
if (!reply) return NULL;
windows = malloc(reply->children_len);
windows = malloc(sizeof(Ecore_X_Window) * reply->children_len);
if (!windows)
return NULL;