isobusfs: cli: use htole16() for the path name length in requests

The Change Current Directory and Open File requests assigned the path
name length to the little endian name_len element without conversion,
which leads to wrong values on big endian hosts.

Use htole16() as it is already done in the other requests.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
Oliver Hartkopp
2026-10-14 10:21:56 +00:00
parent 775611dba2
commit 8222f517b7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ int isobusfs_cli_ccd_req(struct isobusfs_priv *priv, const char *name,
req->tan = isobusfs_cli_get_next_tan(priv);
memcpy(&req->name[0], name, name_len);
req->name_len = name_len;
req->name_len = htole16(name_len);
if (padding_size) {
/* Fill the rest of the res structure with 0xff */