From: Robert Pluim <rpluim@gmail.com>
To: Jonathan Mitchell <mitchell.jkyle@gmail.com>
Cc: 73337@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#73337: 29.4; missing dynamic type checking in network-lookup-address-info
Date: Wed, 18 Sep 2024 17:19:03 +0200 [thread overview]
Message-ID: <87r09hhtw8.fsf@gmail.com> (raw)
In-Reply-To: <CAAnK0Ta-O0D=KyYAHw_PRudOKyi6N_r2Z3EPnBYg3_ZdrDVQqg@mail.gmail.com> (Jonathan Mitchell's message of "Wed, 18 Sep 2024 10:07:25 -0500")
>>>>> On Wed, 18 Sep 2024 10:07:25 -0500, Jonathan Mitchell <mitchell.jkyle@gmail.com> said:
Jonathan> There is no dynamic type checking of the ‘name’ argument in
Jonathan> ‘network-lookup-address-info’, thus causing a crash instead of signaling
Jonathan> a wrong-type-argument error when called with non-string values like
Jonathan> ‘(network-lookup-address-info 1)’ or ‘(network-lookup-address-info ’a)’.
Yep. Eli, emacs-30?
diff --git a/src/process.c b/src/process.c
index 557bdfc918c..216cf916e34 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4729,6 +4729,8 @@ DEFUN ("network-lookup-address-info", Fnetwork_lookup_address_info,
struct addrinfo *res, *lres;
struct addrinfo hints;
+ CHECK_STRING (name);
+
memset (&hints, 0, sizeof hints);
if (NILP (family))
hints.ai_family = AF_UNSPEC;
Robert
--
next prev parent reply other threads:[~2024-09-18 15:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-18 15:07 bug#73337: 29.4; missing dynamic type checking in network-lookup-address-info Jonathan Mitchell
2024-09-18 15:19 ` Robert Pluim [this message]
2024-09-18 16:05 ` Eli Zaretskii
2024-09-19 7:54 ` Robert Pluim
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r09hhtw8.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=73337@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mitchell.jkyle@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).