all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yamaoka@jpl.org, 70415@debbugs.gnu.org
Subject: bug#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with funny name
Date: Sun, 5 May 2024 12:21:03 -0400	[thread overview]
Message-ID: <5f573c50-4d34-4812-87cb-12abcb38ff54@cornell.edu> (raw)
In-Reply-To: <86seyweryy.fsf@gnu.org>

On 5/5/2024 1:40 AM, Eli Zaretskii wrote:
> Right.  Does the below look like the right change to support such
> weird cases?
> 
> diff --git a/src/filelock.c b/src/filelock.c
> index 01d35c4..86c6eeb 100644
> --- a/src/filelock.c
> +++ b/src/filelock.c
> @@ -419,7 +419,9 @@ current_lock_owner (lock_info_type *owner, Lisp_Object lfname)
>         boot += 2;
>         FALLTHROUGH;
>       case ':':
> -      if (! c_isdigit (boot[0]))
> +      if (! c_isdigit (boot[0])
> +	  /* A negative number.  */
> +	  || (boot[0] == '-' && c_isdigit (boot[1])))
>   	return EINVAL;
>         boot_time = strtoimax (boot, &lfinfo_end, 10);
>         break;

Not quite.  I think it should be

diff --git a/src/filelock.c b/src/filelock.c
index 01d35c46726a..faa85a56628b 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -419,7 +419,9 @@ current_lock_owner (lock_info_type *owner, 
Lisp_Object lfname)
        boot += 2;
        FALLTHROUGH;
      case ':':
-      if (! c_isdigit (boot[0]))
+      if (! (c_isdigit (boot[0])
+             /* A negative number.  */
+             || (boot[0] == '-' && c_isdigit (boot[1]))))
         return EINVAL;
        boot_time = strtoimax (boot, &lfinfo_end, 10);
        break;





  reply	other threads:[~2024-05-05 16:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 12:33 bug#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with funny name Katsumi Yamaoka
2024-04-16 13:32 ` Eli Zaretskii
2024-04-16 18:01   ` Pierre Téchoueyres
2024-04-16 22:57   ` Ken Brown
2024-04-17 12:08     ` Eli Zaretskii
2024-04-16 23:58   ` Katsumi Yamaoka
2024-04-17 12:21     ` Eli Zaretskii
2024-04-22 16:15       ` Ken Brown
2024-04-29 23:05         ` Ken Brown
2024-04-30  2:34           ` Eli Zaretskii
2024-04-30  6:45             ` Katsumi Yamaoka
2024-04-30 15:23             ` Ken Brown
2024-04-30 16:20               ` Eli Zaretskii
2024-05-01 21:20                 ` Ken Brown
2024-05-02  6:21                   ` Eli Zaretskii
2024-05-02 14:26                     ` Ken Brown
2024-05-04 17:15                       ` Ken Brown
2024-05-04 17:25                         ` Eli Zaretskii
2024-05-04 17:46                           ` Ken Brown
2024-05-04 22:01                             ` Ken Brown
2024-05-05  5:40                               ` Eli Zaretskii
2024-05-05 16:21                                 ` Ken Brown [this message]
2024-05-05 16:32                                   ` Eli Zaretskii
2024-05-05 17:02                                     ` Ken Brown
2024-05-05 18:00                                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-07  0:07                                       ` Katsumi Yamaoka
2024-05-04 17:30                         ` Ken Brown
2024-05-04 17:37                           ` Eli Zaretskii
2024-05-04 18:46                             ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f573c50-4d34-4812-87cb-12abcb38ff54@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=70415@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.