Skip to content

Commit

Permalink
convert insize to host byte order before use in calculating data size…
Browse files Browse the repository at this point in the history
… (using le32toh)
  • Loading branch information
fandango96 committed Jun 11, 2024
1 parent ddd2a1c commit e68fd6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ioctl_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ cros_ec_ioctl_get_data_size(IOCTL_REQUEST_TYPE _id, const void *data)
{
const struct cros_ec_command_v2 *s_cmd = (struct cros_ec_command_v2 *)data;

return sizeof(struct cros_ec_command_v2) + s_cmd->insize;
return sizeof(struct cros_ec_command_v2) + le32toh(s_cmd->insize);
}

ioctl_type ioctl_db[] = {
Expand Down

0 comments on commit e68fd6d

Please sign in to comment.