diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-08-08 12:20:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-08-08 19:21:12 +0000 |
commit | cf5f0d3827f761325059996b879a5876f8513926 (patch) | |
tree | cbcf3bef1b66b3f34f75d616ceb34a794f637e2c /wsutil | |
parent | 8b364ea06b0f0dbf938a88388836ea8262bd6997 (diff) |
Fix the polynomial for the CCITT CRC.
And note that it's the same polynomial for the MPEG-2 CRC.
Change-Id: Ie89e392156ae77a2adeec3eb8e704aa75c0cd0dc
Reviewed-on: https://code.wireshark.org/review/3512
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/crc32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wsutil/crc32.c b/wsutil/crc32.c index a8df05bfbd..549705c125 100644 --- a/wsutil/crc32.c +++ b/wsutil/crc32.c @@ -112,8 +112,8 @@ static const guint32 crc32c_table[256] = { * * Polynomial is * - * x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^8 + x^7 + - * x^5 + x^4 + x^2 + x + 1 + * x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + + * x^7 + x^5 + x^4 + x^2 + x + 1 */ static const guint32 crc32_ccitt_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, @@ -177,6 +177,8 @@ static const guint32 crc32_ccitt_table[256] = { * * x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + * x^7 + x^5 + x^4 + x^2 + x + 1 + * + * (which is the same polynomial as the one above us). */ static const guint32 crc32_mpeg2_table[256] = { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, |