dev-libs/wayland: Upstream patch for handling null strings

This fixes an input validation bug where libwayland would accept null
strings as message arguments even when the protocol definition
specified that the string must not be null. The message callback would
likely not expect to receive a null pointer, and non-nullable strings
are the default in wayland protocols, so this allows for both clients
and compositors to trivially trigger crashes in each other.

A quick search shows many instances in both exo and sommelier of
callbacks that don't check for null strings before using them. This
patch fixes all instances where this assumption is justified by the
protocol definition.

I am leaving this in portage-stable for now in the expectation that
this will be accepted in to 1.20.

Upstream merge request:
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/149

BUG=none
TEST=CQ

Change-Id: I305186c58202509dd60baa3f44b0763a4bf1e79b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2984363
Commit-Queue: Fergus Dall <sidereal@google.com>
Commit-Queue: David Munro <davidmunro@google.com>
Tested-by: Fergus Dall <sidereal@google.com>
Auto-Submit: Fergus Dall <sidereal@google.com>
Reviewed-by: David Munro <davidmunro@google.com>
3 files changed