Logical "off by one" issue in loop counts up to IOV_MAX IOV_MAX is set to 16 on Solaris but Samba passes up to 17 IO-vectors to writev/readv Also has been found "difference" between maximal value of "iovcnt" (3rd arg. of writev/readv) in: Solaris manpage writev(2) and POSIX standard: http://pubs.opengroup.org/onlinepubs/9699919799/functions/writev.html --- a/lib/tsocket/tsocket.c 2019-01-02 12:59:28.320172791 +0000 +++ b/lib/tsocket/tsocket.c 2019-01-02 13:12:26.155345793 +0000 @@ -539,7 +539,7 @@ /* first check if the input is ok */ #ifdef IOV_MAX - if (count > IOV_MAX) { + if (count >= IOV_MAX) { tevent_req_error(req, EMSGSIZE); goto post; } @@ -661,7 +661,7 @@ /* first check if the input is ok */ #ifdef IOV_MAX - if (count > IOV_MAX) { + if (count >= IOV_MAX) { tevent_req_error(req, EMSGSIZE); goto post; }