GNU bug report logs - #75938
31.0.50; Temporary file-names overflowing MAX_PATH characters

Previous Next

Package: emacs;

Reported by: arthur miller <arthur.miller <at> live.com>

Date: Thu, 30 Jan 2025 03:46:01 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: arthur miller <arthur.miller <at> live.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 75938 <at> debbugs.gnu.org
Subject: bug#75938: 31.0.50; Temporary file-names overflowing MAX_PATH characters
Date: Thu, 30 Jan 2025 09:41:18 +0200
> From: arthur miller <arthur.miller <at> live.com>
> Date: Thu, 30 Jan 2025 03:45:43 +0000
> 
> I am not sure if this is a bug or not; so do what you want with this.
> 
> It is fully possibly to create names that are not valid as file names,
> via make-temp-name and make-temp-file, which are frontend for the
> make-temp-file-internal function. For example:
> 
> (make-temp-name (make-string 1024 ?a))
> 
> will succeed without problems, but of course:
> 
> (make-temp-file (make-string 1024 ?a))
> 
> will fail, later on when it actually tries to create the file.
> 
> Attached is a suggested fix; the idea is to save the unnecessary trip to
> the OS; it signals error if the total file name length is longer than
> MAX_PATH.
> 
> I don't know if it is a feature to have temp-names longer than certain
> length, if it is than OK; this is more of a question/suggestion than a
> bug report.

I think the idea is that the call to make_uninit_string will signal an
error if its argument exceeds STRING_BYTES_MAX, and the relevant
system library functions will error with ENAMETOOLONG if they cannot
support such long file names.

Adding Paul to the discussion.




This bug report was last modified 173 days ago.

Previous Next


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