[PATCH] libXinerama: Set number to 0 on error.

Adam Jackson ajax at nwnk.net
Tue Jan 24 14:41:05 UTC 2017


On Mon, 2017-01-23 at 19:00 +0100, Tobias Stoeckmann wrote:
> On Mon, Jan 23, 2017 at 11:52:13AM -0500, Adam Jackson wrote:
> > Not that any caller has likely made this mistake, but you want an
> > if
> > (number) before this, otherwise you turn a protocol error into a
> > segfault.
> 
> If a caller supplies NULL, a segfault would always occur because the
> pointer is never checked for NULL.

Hah! Okay, I still think that's sloppy, but it's at least no worse.
Merged, thanks:

remote: I: patch #134602 updated using rev 1142dd023acaac3cad96137aaf24c45b260e3ecd.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/lib/libXinerama
   edd9518..1142dd0  master -> master

- ajax


More information about the xorg-devel mailing list