diff options
author | tmm <tmm@FreeBSD.org> | 2002-10-20 23:13:05 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2002-10-20 23:13:05 +0000 |
commit | f70d2339384264994949fcacf0bb4b036c6a9b3a (patch) | |
tree | e565d4978f804d6d1f0e5dfe9870ecd6abc74d8c /lib/libfetch/common.h | |
parent | 372039cd6ff7cd063901f2520a41ee3a37345668 (diff) | |
download | FreeBSD-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