]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
sctp_crc32c: fix crc calculation in the NULL buffer case
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 4 Oct 2013 23:43:38 +0000 (16:43 -0700)
committerSage Weil <sage@inktank.com>
Wed, 16 Oct 2013 16:28:14 +0000 (09:28 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/common/sctp_crc32.c

index 2b4fceccf230e2a2aa064ea20ebb92cd7652dfd6..c02ed856dbd78abf8e9881837fba4761237d7f9a 100644 (file)
@@ -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;
 }