aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-02-10 20:04:26 +0200
committerEli Zaretskii2021-02-10 20:04:26 +0200
commitd03f2a6ee942882c5bc78226b4730dac6f1d0916 (patch)
tree1352d5f25d6aaf2b4bcf10811d0a5378a5bc1381 /src
parentdcc00bbb1989b27c49442422e7fbaf8c3f6415cb (diff)
downloademacs-d03f2a6ee942882c5bc78226b4730dac6f1d0916.tar.gz
emacs-d03f2a6ee942882c5bc78226b4730dac6f1d0916.zip
Avoid assertion violation in callproc.c
* src/callproc.c (call_process): Avoid assertion violation when DESTINATION is a cons cell '(:file . "FOO")'. (Bug#46426)
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 5b1d8bfb765..3eac38d375a 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -394,7 +394,11 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
394 /* If the buffer is (still) a list, it might be a (:file "file") spec. */ 394 /* If the buffer is (still) a list, it might be a (:file "file") spec. */
395 if (CONSP (buffer) && EQ (XCAR (buffer), QCfile)) 395 if (CONSP (buffer) && EQ (XCAR (buffer), QCfile))
396 { 396 {
397 output_file = Fexpand_file_name (XCAR (XCDR (buffer)), 397 Lisp_Object ofile = XCDR (buffer);
398 if (CONSP (ofile))
399 ofile = XCAR (ofile);
400 CHECK_STRING (ofile);
401 output_file = Fexpand_file_name (ofile,
398 BVAR (current_buffer, directory)); 402 BVAR (current_buffer, directory));
399 CHECK_STRING (output_file); 403 CHECK_STRING (output_file);
400 buffer = Qnil; 404 buffer = Qnil;