From 0620eead3d056ceb05b5073b8a8f8fdaf77edecd Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 4 Oct 2013 16:43:38 -0700 Subject: [PATCH] sctp_crc32c: fix crc calculation in the NULL buffer case Signed-off-by: Yehuda Sadeh --- src/common/sctp_crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sctp_crc32.c b/src/common/sctp_crc32.c index 2b4fceccf23..c02ed856dbd 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; } -- 2.47.3