emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c464113049: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master c464113049: Merge from origin/emacs-28
Date: Tue, 4 Oct 2022 14:18:55 -0400 (EDT)

branch: master
commit c4641130493f0920de0f0c4543ac80504fd5d5f7
Merge: 56210bfc7a a78af3018e
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Merge from origin/emacs-28
    
    a78af3018e * src/emacs.c (load_pdump): Propery handle case when execu...
    
    # Conflicts:
    #       src/emacs.c
---
 src/emacs.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index b2078aaef3..43e81b912c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -891,13 +891,17 @@ load_pdump (int argc, char **argv)
     }
 
   /* Where's our executable?  */
-  ptrdiff_t exec_bufsize, needed;
+  ptrdiff_t exec_bufsize, bufsize, needed;
   emacs_executable = find_emacs_executable (argv[0], &exec_bufsize);
 
   /* If we couldn't find our executable, go straight to looking for
      the dump in the hardcoded location.  */
   if (!(emacs_executable && *emacs_executable))
-    goto hardcoded;
+    {
+      bufsize = 0;
+      dump_file = NULL;
+      goto hardcoded;
+    }
 
   if (dump_file)
     {
@@ -925,7 +929,7 @@ load_pdump (int argc, char **argv)
                      strip_suffix_length))
        exenamelen = prefix_length;
     }
-  ptrdiff_t bufsize = exenamelen + strlen (suffix) + 1;
+  bufsize = exenamelen + strlen (suffix) + 1;
   dump_file = xpalloc (NULL, &bufsize, 1, -1, 1);
   memcpy (dump_file, emacs_executable, exenamelen);
   strcpy (dump_file + exenamelen, suffix);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]