summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/common.h
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-10-20 23:13:05 +0000
committertmm <tmm@FreeBSD.org>2002-10-20 23:13:05 +0000
commitf70d2339384264994949fcacf0bb4b036c6a9b3a (patch)
treee565d4978f804d6d1f0e5dfe9870ecd6abc74d8c /lib/libfetch/common.h
parent372039cd6ff7cd063901f2520a41ee3a37345668 (diff)
downloadFreeBSD-src-f70d2339384264994949fcacf0bb4b036c6a9b3a.zip
FreeBSD-src-f70d2339384264994949fcacf0bb4b036c6a9b3a.tar.gz
Fix the calculations of the length of the unread message buffer
contents. The code was subtracting two unsigned ints, stored the result in a log and expected it to be the same as of a signed subtraction; this does only work on platforms where int and long have the same size (due to overflows). Instead, cast to long before the subtraction; the numbers are guaranteed to be small enough so that there will be no overflows because of that.
Diffstat (limited to 'lib/libfetch/common.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud