public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Radisson <radisson97@web.de>
To: linux-man@vger.kernel.org
Cc: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Subject: fix: recvfrom() error handling
Date: Thu, 27 Mar 2025 11:55:43 +0100	[thread overview]
Message-ID: <5449c846-e9ff-4c4c-b161-485da08a578b@web.de> (raw)

Hello List,
while chasing an unrelated bug i found the description of recvfrom()
was missing some error description. I would suggest to add a few lines
to make this confusing state more clear.

CU

--- recv.2.org	2025-03-25 21:55:10.914273000 +0100
+++ recv.2	2025-03-25 22:55:18.843789307 +0100
@@ -299,6 +299,23 @@
  and
  .I addrlen
  should be specified as NULL.
+If
+.I src_addr
+is NULL
+.I addrlen
+will be ignored.
+
+If
+.I src_addr
+is not NULL and
+.I addrlen
+is less than null the call will return with
+.IR EINVAL .
+If
+.I addrlen
+is less than sizeof struct sockaddr_in the src_addr will
+not be modified.
+
  .\"
  .SS recv()
  The


             reply	other threads:[~2025-03-27 10:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 10:55 Peter Radisson [this message]
2025-03-27 12:29 ` fix: recvfrom() error handling Alejandro Colomar
2025-03-27 16:35   ` Peter Radisson
2025-03-27 17:28     ` Alejandro Colomar
2025-03-27 17:47       ` Peter Radisson
2025-03-28 22:45         ` Carlos O'Donell
2025-03-28 23:26           ` Peter Radisson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5449c846-e9ff-4c4c-b161-485da08a578b@web.de \
    --to=radisson97@web.de \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox