[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73337: 29.4; missing dynamic type checking in network-lookup-address
From: |
Robert Pluim |
Subject: |
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@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
--