Skip to content
Snippets Groups Projects
Commit c44ba9f6 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

lib/checksum.c: use 32-bit arithmetic consistently


The use of 'unsigned long' variables in the 32-bit part of do_csum()
is confusing at best, and potentially broken for long input on 64-bit
machines.

This changes the code to use 'unsigned int' instead, which makes
the code behave in the same (correct) way on both 32 and 64 bit
machines.

Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent b6727b12
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment