This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RT 75082: recv() with MSG_TRUNC flag SEGV
authorDavid Mitchell <davem@iabyn.com>
Sun, 31 Oct 2010 12:44:39 +0000 (12:44 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 31 Oct 2010 13:04:03 +0000 (13:04 +0000)
commit8eb023a9cc1ea46c4dc9b9bb6dd651817ac32889
tree291f6c555c2139af350c58b8bdfb6bedf5a8059a
parente97701b4b83f1279df76a98fe4d520e07dd60c99
RT 75082: recv() with MSG_TRUNC flag SEGV

The recv() system call, with the MSG_TRUNC flag, returns the
true size of the packet, even if it is larger than the supplied buffer.
Since perl's equivalent recv() function doesn't return the size
(apart from what's implied as the returned length of the buffer), there
doesn't seem to to be any way to return this value to the caller. So
silently ignore it.

Before, we were setting SvCUR to the size, even if it was larger than
the buffer. Which was Bad.
pp_sys.c