[PATCH 0/3] *** [#3619] socket.recvfrom crops UDP packets ***
Alexander Turenko
alexander.turenko at tarantool.org
Fri Aug 24 05:47:36 MSK 2018
Hi!
Vladimir, please review the patchset.
Yaroslav, please confirm that the new behaviour is one you want.
The changes in short:
* evaluate buffer size for a UDP socket in recv / recvfrom when it was
not passed;
* discard a datagram in recv / recvfrom when it is larger then the input
buffer, when the size was passed;
* prevent defererence of a pointer to non-initialized data in case of
recvfrom was called for a TCP socket.
WBR, Alexander Turenko.
branch: Totktonada/gh-3619-socket-recvfrom-detect-a-cropped-packet
travis-ci: https://travis-ci.org/tarantool/tarantool/builds/419931085
issue: https://github.com/tarantool/tarantool/issues/3619
Alexander Turenko (3):
socket: evaluate buffer size in recv / recvfrom
socket: don't truncate a datagram in recv/recvfrom
socket: prevent recvfrom from returning garbage
src/lua/socket.c | 25 ++
src/lua/socket.lua | 84 +++++-
test/app/socket.result | 540 ++++++++++++++++++++++++++++++++++++++-
test/app/socket.test.lua | 198 ++++++++++++++
4 files changed, 842 insertions(+), 5 deletions(-)
--
2.17.1
More information about the Tarantool-patches
mailing list