From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable Date: Fri, 17 Sep 2021 10:49:59 +0300 Message-ID: <83fsu38wuw.fsf@gnu.org> References: <83o8ary5kl.fsf@gnu.org> <87pmtbj81v.fsf@gmail.com> <8335q7c655.fsf@gnu.org> <87pmta6buq.fsf@gmail.com> <837dfgaerv.fsf@gnu.org> <8735q4zcdh.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9313"; mail-complaints-to="usenet@ciao.gmane.io" Cc: phst@google.com, 49723@debbugs.gnu.org To: Federico Tedin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 17 09:51:10 2021 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 1mR8eL-0002C7-Lc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Sep 2021 09:51:09 +0200 Original-Received: from localhost ([::1]:37972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mR8eJ-0004I0-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Sep 2021 03:51:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR8eE-0004HW-8d for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2021 03:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mR8eE-000575-0o for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2021 03:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mR8eD-0000zR-W5 for bug-gnu-emacs@gnu.org; Fri, 17 Sep 2021 03:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Sep 2021 07:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49723 X-GNU-PR-Package: emacs Original-Received: via spool by 49723-submit@debbugs.gnu.org id=B49723.16318650383772 (code B ref 49723); Fri, 17 Sep 2021 07:51:01 +0000 Original-Received: (at 49723) by debbugs.gnu.org; 17 Sep 2021 07:50:38 +0000 Original-Received: from localhost ([127.0.0.1]:58378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR8dq-0000yl-6C for submit@debbugs.gnu.org; Fri, 17 Sep 2021 03:50:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR8do-0000yY-27 for 49723@debbugs.gnu.org; Fri, 17 Sep 2021 03:50:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52676) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mR8di-0004ar-4F; Fri, 17 Sep 2021 03:50:30 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2178 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR8dV-000169-7d; Fri, 17 Sep 2021 03:50:29 -0400 In-Reply-To: <8735q4zcdh.fsf@gmail.com> (message from Federico Tedin on Thu, 16 Sep 2021 18:58:02 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:214530 Archived-At: > From: Federico Tedin > Cc: phst@google.com, 49723@debbugs.gnu.org > Date: Thu, 16 Sep 2021 18:58:02 +0200 > > >> +** 'expand-file-name' now checks for null bytes in filenames. > >> +The function will now check for null bytes in both NAME and > >> +DEFAULT-DIRECTORY arguments, as well as in the 'default-directory' > >> +buffer-local variable, assuming its value is used. > > > > This should say that if null bytes are found, expand-file-name will > > signal an error. > > Makes sense! I'm attaching a revised version. Thanks. Did you run the test suite after applying the changes, and did you see no regressions? If you didn't yet run the test suite, please be sure to run all of it, as the use of expand-file-name is universal.