From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#73337: 29.4; missing dynamic type checking in network-lookup-address-info Date: Wed, 18 Sep 2024 17:19:03 +0200 Message-ID: <87r09hhtw8.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20197"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73337@debbugs.gnu.org, Eli Zaretskii To: Jonathan Mitchell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 18 17:21:00 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqwUG-00052L-Je for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Sep 2024 17:21:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqwU3-00032I-H7; Wed, 18 Sep 2024 11:20:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqwU2-00032A-2d for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 11:20:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqwU1-0004L8-Py for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 11:20:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=LX0FpSVJczM+UkSY5buUeYBO25SQza/hblfaqns147A=; b=pqi67UJm4G4xwmA2uTiNt7tEqj2x0TVTikjBYXWmQS8UY56bVKUwK9x+yy980W7ymjZ9HNT6tEFbqYmuWVTFjTT9iBjcVkwPT57xZHEvijyqmicKmxPRjexXyd1ZyflyCl34VfAwDFQn2LnIB7KUNNh3t1zXyq47SSSHmINLWJZyo8JJGMlyVdLb1G95ABNo+cROKCJRGm+PcfPIhPY8P7EfZedJg2oSWCX5Xq0s3hnuc9qvDxh8HEqmDE8ataXKNJuPiZcQZJbZrKUQMbDKJi89lHLUFtsfLpRp5/E3NxNOjQiON4UtrWYXJn6zrEDCbBu7hht6DnSnqWtaMUlZow==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqwUH-0002bJ-Oj for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2024 11:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2024 15:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73337 X-GNU-PR-Package: emacs Original-Received: via spool by 73337-submit@debbugs.gnu.org id=B73337.17266728299937 (code B ref 73337); Wed, 18 Sep 2024 15:21:01 +0000 Original-Received: (at 73337) by debbugs.gnu.org; 18 Sep 2024 15:20:29 +0000 Original-Received: from localhost ([127.0.0.1]:59118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqwTk-0002aD-VY for submit@debbugs.gnu.org; Wed, 18 Sep 2024 11:20:29 -0400 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:44259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqwTj-0002UM-1E for 73337@debbugs.gnu.org; Wed, 18 Sep 2024 11:20:28 -0400 Original-Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42cb7a2e4d6so58497525e9.0 for <73337@debbugs.gnu.org>; Wed, 18 Sep 2024 08:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726672745; x=1727277545; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LX0FpSVJczM+UkSY5buUeYBO25SQza/hblfaqns147A=; b=Lf64KCdT6z9FOX+i7GkrtgRRjGJqKc5NXnveGNnmKDmRbwpO6bG9076kPZcmwg7BIX 2PSanwG3sgQBU4AFIeckso0CnrVMFvU4tln55oE1tsK08ZJ+p73aRrO6uQRDFQYr5syL CrCE29UBXve8TOvBbUmJWIXCHm/upIE42+Q0rnX/ofRv6c/W/P03wrOAK+bCHRFQ8Yzb j13+sDXy48zUXT8w8UNtREhzHAxRPJV0fr1SBs/d+aHQBEAjKwgUqTO0DzA2ufYnv3aW H99CPBifBRZAFxF2O+ppKB3EtOUFSCvLM9xcue+zxYV1CxtW1RApzU+Y5tu2CSVaZz1e AxsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726672745; x=1727277545; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LX0FpSVJczM+UkSY5buUeYBO25SQza/hblfaqns147A=; b=ZTLTYC4iFPNxMys3cO/9ezwGgHlT516WCedcSgmJUubSeo5dBoNY11QHV+RnrrixI3 uZ+Ya/MtOezwlsad8bLN+krl+jRehrmdHt4lRcrGvm6XyoKl3pBNm+mgq69IlAAkVK/x a+KrhY4a46jico4LHTMLjZMvSndzgnsOkppSBXf/e/Pf1SL9A+9vfQqWBSmk9G6wEjSX 7IyvzpSCcAHGzHIg3zOOkv1Tl5Z28TXPfZNHLVwtBejn719qELDJOoiJ1lCSqpWGxJka c2Dz3tGMD4TqqePjHop4VWXZFnqIVrIrj83ZdW3EbPlDCEyg82vPp9HI6ltbk6IzUE8s mUlw== X-Gm-Message-State: AOJu0Yziyyfbb0rlM9/2BcYN1+Bcs3WRfUXerXEUk4tYdzWqUJXCmwB2 +/tW9SrgMCZM7XmoWlB7jfXmck/PROlLZBzWWuMZD9HNFzLRc03o X-Google-Smtp-Source: AGHT+IGI/8INTqhWYW+4z84iANk4jXKNXlDbzU9h6+xmEQqIMKsKrwVuCK5lalQwz3uFG8Rw7m0wrA== X-Received: by 2002:a05:600c:1c85:b0:42c:c003:edd8 with SMTP id 5b1f17b1804b1-42cdb531938mr181960095e9.6.1726672744539; Wed, 18 Sep 2024 08:19:04 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb51:a069:79f4:e159:b9b3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e7800152sm12621377f8f.74.2024.09.18.08.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 08:19:03 -0700 (PDT) In-Reply-To: (Jonathan Mitchell's message of "Wed, 18 Sep 2024 10:07:25 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292008 Archived-At: >>>>> On Wed, 18 Sep 2024 10:07:25 -0500, Jonathan Mitchell said: Jonathan> There is no dynamic type checking of the =E2=80=98name=E2=80= =99 argument in Jonathan> =E2=80=98network-lookup-address-info=E2=80=99, thus causing a= crash instead of signaling Jonathan> a wrong-type-argument error when called with non-string value= s like Jonathan> =E2=80=98(network-lookup-address-info 1)=E2=80=99 or =E2=80= =98(network-lookup-address-info =E2=80=99a)=E2=80=99. 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; =20 + CHECK_STRING (name); + memset (&hints, 0, sizeof hints); if (NILP (family)) hints.ai_family =3D AF_UNSPEC; Robert --=20