From bb43b5670c231d88094dc099759b794a49e561e7 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 12 Aug 2026 11:28:55 +0200 Subject: [PATCH] libink: mark the big-endian gap where it is decided Only the file header said we refuse 'B' messages, and nobody reads a header comment when they are looking at why a parse failed. Put it at the check, with an XXX so it turns up in a grep for known gaps. Signed-off-by: Joachim Wiberg --- libink/proto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libink/proto.c b/libink/proto.c index 96e96cf5..15068f14 100644 --- a/libink/proto.c +++ b/libink/proto.c @@ -85,6 +85,9 @@ ssize_t __msg_parse(const uint8_t *buf, size_t len, struct link_msg *out) if (len < HDR_FIXED_SIZE) return 0; + /* XXX: a big-endian sender is refused rather than byte-swapped. + * Every conforming client on the platforms Finit targets sends + * 'l', so the swap paths have not been worth writing. */ if (buf[0] != 'l') { errno = EPROTO; return -1;