Thread (1 message) 1 message, 1 author, 2010-10-27

Re: [PATCH 1/4] tipc: Fix bugs in tipc_msg_calc_data_size()

From: David Miller <davem@davemloft.net>
Date: 2010-10-27 19:16:41

From: Paul Gortmaker <redacted>
Date: Wed, 27 Oct 2010 15:13:33 -0400
From: Allan Stephens <redacted>

Enhances TIPC's computation of the amount of data to be sent so that
it works properly when large values are involved. Calculations are now
done using "size_t" instead of "int", and a check has been added to
handle cases where the total amount of data exceeds the range of "size_t".

Signed-off-by: Allan Stephens <redacted>
The protocol socket I/O call ops can't even return anything larger
than an 'int' because of the signature for those function pointers
(check out *sendmsg and *recvmsg in include/linux/net.h).

So returning "long" from here doesn't make any sense.

You really have to limit the usable lengths to the range of
an 'int' all the way up to the code in net/socket.c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help