mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00: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:
1 parent
853e226812
commit
bb43b5670c
1 file changed
+3
@@ -85,6 +85,9 @@ ssize_t __msg_parse(const uint8_t *buf, size_t len, struct link_msg *out)
|
|||||||
if (len < HDR_FIXED_SIZE)
|
if (len < HDR_FIXED_SIZE)
|
||||||
return 0;
|
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') {
|
if (buf[0] != 'l') {
|
||||||
errno = EPROTO;
|
errno = EPROTO;
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in new issue
Block a user