diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-04-24 16:52:22 +0200 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-04-24 16:52:22 +0200 |
commit | 957ce488fc519af350f2c49ccd7ff9afbb02eec7 (patch) | |
tree | 78c4bc97565d3f8afdc40cf9ba690608df7413c5 /ltunify.c | |
parent | f761d31d0b7780dba92da8c39e08d97d2c47bd61 (diff) | |
download | ltunify-957ce488fc519af350f2c49ccd7ff9afbb02eec7.tar.gz |
ltunify: fix copying one byte too much (caught by -fsanitze=address)
Diffstat (limited to 'ltunify.c')
-rw-r--r-- | ltunify.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -449,7 +449,7 @@ static bool get_register(int fd, u8 device_index, u8 address, memset(msg.msg_short.value, 0, sizeof msg.msg_short.value); msg.msg_short.address = address; if (params) { - memcpy(&msg.msg_short.value, params, SHORT_MESSAGE_LEN - HEADER_SIZE); + memcpy(&msg.msg_short.value, params, sizeof msg.msg_short.value); } if (!do_write(fd, &msg)) { |