i2cset: fix 'i' & 's' modes (3 extra bytes were sent)
authorAvi Fishman <AviFishman70@gmail.com>
Thu, 5 Oct 2017 09:25:16 +0000 (11:25 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 5 Oct 2017 09:25:16 +0000 (11:25 +0200)
commitb5d9ba8fe64a0aacf99fd1eec10375a98104a5ea
tree814c48b7c5a35fbb141fb8be939f17b3145d9307
parent6f97b30a904407c1f1701d937d9258ca9175c6ab
i2cset: fix 'i' & 's' modes (3 extra bytes were sent)

When 'i' or 's' modes are selected block array is filled from offset 3
(blen = 3) but copied to data.block buffer from offset 0 so first 3 bytes
contains garbage from stack.
The buffer that is sent is also 3 bytes too long due to those extra 3
bytes.

Signed-off-by: Avi Fishman <AviFishman70@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/i2c_tools.c