diff options
author | Marek Roszko <[email protected]> | 2014-08-20 21:39:41 -0400 |
---|---|---|
committer | Wolfram Sang <[email protected]> | 2014-09-02 14:29:33 +0200 |
commit | 75b81f339c6af43f6f4a1b3eabe0603321dade65 (patch) | |
tree | c3fe33ee41b403ca194c82a14c76652e19038145 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 5da4309f9e1b4de9c2b69e917912fbb84006d44e (diff) |
i2c: at91: add bound checking on SMBus block length bytes
The driver was not bound checking the received length byte to ensure it was within the
the buffer size that is allocated for SMBus blocks. This resulted in buffer overflows
whenever an invalid length byte was received.
It also failed to ensure the length byte was not zero. If it received zero, it would end up
in an infinite loop as the at91_twi_read_next_byte function returned immediately without
allowing RHR to be read to clear the RXRDY interrupt.
Tested agaisnt a SMBus compliant battery.
Signed-off-by: Marek Roszko <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions