Commit graph

4 commits

Author SHA1 Message Date
Thomas Weißschuh
f3e36f124a lib: add crc64 implementation
This was lifted from libcrc [0] commit 7719e2112a9a960b1bba130d02bebdf58e8701f1

https://github.com/lammertb/libcrc

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2022-09-12 18:03:23 +02:00
Kent Overstreet
7ce27dc517 libblkid: Update for newer bcache superblocks
Later version of bcache add different checksum types, and allow for superblocks
greater than 4k - skipping the checksum check (as in most other probes) is the
easiest solution.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2016-03-23 10:52:38 +01:00
Sami Kerola
95e8d2b3bc lib: fix crc32 and crc64 interger overflows [AddressSanitizer]
lib/crc32.c:111:11: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'size_t' (aka 'unsigned long')

lib/crc64.c:101:12: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'size_t' (aka 'unsigned long')

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-12-19 09:10:48 +00:00
Karel Zak
db2a3dda74 lib: add crc64()
Based on bcache code from Rolf Fokkens.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-11 16:40:06 +02:00