fix possible 0 byte allocation

SVN revision: 66294
This commit is contained in:
Mike Blumenkrantz 2011-12-16 18:04:53 +00:00
parent b21fb2cb05
commit ad37a6a256
2 changed files with 4 additions and 1 deletions

View File

@ -418,3 +418,6 @@
plug process to it can see key, mouse, multi etc. events.
2011-12-16 Mike Blumenkrantz
* Fix possible 0 byte allocation in ecore-x

View File

@ -1132,7 +1132,7 @@ ecore_x_window_root_list(int *num_ret)
overlap++;
}
}
roots = malloc((num - overlap) * sizeof(Window));
roots = malloc(MAX((num - overlap) * sizeof(Window), 1));
if (roots)
{
int k;