Skip to content
Commit 34f4464f authored by Alan Coopersmith's avatar Alan Coopersmith
Browse files

If XGetImage fails to create image, don't dereference it to bounds check



Reported by gcc 7.3:

GetImage.c:110:25: warning: potential null pointer dereference [-Wnull-dereference]
  if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
                    ~~~~~^~~~~~~~

Introduced by 8ea762f9 in Xlib 1.6.4

Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent e835a9dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment