mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
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 <troglobit@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user