ei: Don't send request_name with NULL name

Sending `NULL` here is a protocol violation since this is not marked as
`allow-null` in the protocol spec.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/375>
This commit is contained in:
Ian Douglas Scott 2026-02-16 19:15:43 -08:00
parent e8994dfe17
commit 9883a2ba2a

View file

@ -83,7 +83,7 @@ ei_handshake_initialize(struct ei_handshake *setup, uint32_t version)
EI_HANDSHAKE_CONTEXT_TYPE_SENDER :
EI_HANDSHAKE_CONTEXT_TYPE_RECEIVER);
if (version >= EI_HANDSHAKE_REQUEST_NAME_SINCE_VERSION)
if (version >= EI_HANDSHAKE_REQUEST_NAME_SINCE_VERSION && ei->name != NULL)
ei_handshake_request_name(setup, ei->name);
if (version >= EI_HANDSHAKE_REQUEST_INTERFACE_VERSION_SINCE_VERSION) {