Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | lib: fix crc32 and crc64 interger overflows [AddressSanitizer] | Sami Kerola | 2014-12-19 | 1 | -1/+3 |
| | | | | | | | | | | 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> | ||||
* | lib: add a generic crc32() | Karel Zak | 2009-09-16 | 1 | -0/+116 |
This is public domain implementation, based on static crc32_table[]. This implementation is used on may places (libparted, FreeBSD kernel, PostgreSQL, ...). The Linux kernel uses on-the-fly generated and allocated tables. That's useless in shared libraries. Signed-off-by: Karel Zak <kzak@redhat.com> |