From: Yehuda Sadeh Date: Fri, 4 Oct 2013 23:43:38 +0000 (-0700) Subject: sctp_crc32c: fix crc calculation in the NULL buffer case X-Git-Tag: v0.72-rc1~42^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0620eead3d056ceb05b5073b8a8f8fdaf77edecd;p=ceph.git sctp_crc32c: fix crc calculation in the NULL buffer case Signed-off-by: Yehuda Sadeh --- diff --git a/src/common/sctp_crc32.c b/src/common/sctp_crc32.c index 2b4fceccf230..c02ed856dbd7 100644 --- a/src/common/sctp_crc32.c +++ b/src/common/sctp_crc32.c @@ -627,7 +627,7 @@ sctp_crc32c_sb8_64_bit_zero(uint32_t crc, #endif } for (li = 0; li < end_bytes; li++) - crc = sctp_crc_tableil8_o32[crc] ^ + crc = sctp_crc_tableil8_o32[crc & 0x000000FF] ^ (crc >> 8); return crc; }