From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Alexander Turenko Subject: [PATCH 0/3] *** [#3619] socket.recvfrom crops UDP packets *** Date: Fri, 24 Aug 2018 05:47:36 +0300 Message-Id: To: Vladimir Davydov Cc: Alexander Turenko , tarantool-patches@freelists.org, Yaroslav Dynnikov List-ID: 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