commit | 1c9dfe73640542e1eefc8d69389cea73c0dc5ce3 | [log] [tgz] |
---|---|---|
author | Linn Crosetto <linn@hpe.com> | Tue Oct 27 15:31:12 2015 -0600 |
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | Wed Jan 27 11:53:53 2016 -0800 |
tree | b213bf37328aa77dbc1eef413a06c9f17a086226 | |
parent | 2c2f71313e5717e9858fcbcfbe102a1964b6e385 [diff] |
Handle odd buffer lengths in checksum Buffers of odd length can be passed to the checksum, for example signatures. csum_bytes uses a uint16_t so change the function to prevent overflowing the buffer, while taking the extra byte into account if the length is odd. Signed-off-by: Linn Crosetto <linn@hpe.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>