GNU bug report logs - #73337
29.4; missing dynamic type checking in network-lookup-address-info

Previous Next

Package: emacs;

Reported by: Jonathan Mitchell <mitchell.jkyle <at> gmail.com>

Date: Wed, 18 Sep 2024 15:09:02 UTC

Severity: normal

Tags: fixed

Found in version 29.4

Fixed in version 30.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 73337 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Jonathan Mitchell <mitchell.jkyle <at> gmail.com>
Cc: 73337 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#73337: 29.4; missing dynamic type checking in
 network-lookup-address-info
Date: Wed, 18 Sep 2024 17:19:03 +0200
>>>>> On Wed, 18 Sep 2024 10:07:25 -0500, Jonathan Mitchell <mitchell.jkyle <at> 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
-- 




This bug report was last modified 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.