Check that we get enough data for width and height.

SVN revision: 16917
This commit is contained in:
sebastid 2005-09-24 13:18:43 +00:00 committed by sebastid
parent 7c0400bfc8
commit de083d7324
1 changed files with 6 additions and 1 deletions

View File

@ -638,7 +638,12 @@ ecore_x_netwm_icon_get(Ecore_X_Window win, int *width, int *height, unsigned int
XA_CARDINAL, 32, &data_ret, &num_ret))
return 0;
if (!data_ret) return 0;
if (num_ret < 2)
{
free(data_ret);
return 0;
}
data = (unsigned int *)data_ret;
if (icon)