diff options
| author | Mattias EngdegÄrd | 2020-04-06 15:20:08 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-04-09 11:34:48 +0200 |
| commit | 402cbc5be26827244075dbe14288e7722290f83a (patch) | |
| tree | 6238d25cbd648e14cb1dcc309a8542fc312e40bf /src/w32proc.c | |
| parent | 20eb4247cdc2eeada43c3de8abf9c577be38c98f (diff) | |
| download | emacs-402cbc5be26827244075dbe14288e7722290f83a.tar.gz emacs-402cbc5be26827244075dbe14288e7722290f83a.zip | |
Don't rely on copying in {EN,DE}CODE_FILE
Callers of ENCODE_FILE and DECODE_FILE should not assume that these
functions always return a new string (bug#40407).
* src/w32fns.c (Fw32_shell_execute):
* src/w32proc.c (Fw32_application_type):
Sink taking the address of a Lisp string past GC points.
Copy values returned from ENCODE_FILE before mutating them.
Diffstat (limited to 'src/w32proc.c')
| -rw-r--r-- | src/w32proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/w32proc.c b/src/w32proc.c index de337269050..16e32e4c58d 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -3231,7 +3231,7 @@ such programs cannot be invoked by Emacs anyway. */) | |||
| 3231 | char *progname, progname_a[MAX_PATH]; | 3231 | char *progname, progname_a[MAX_PATH]; |
| 3232 | 3232 | ||
| 3233 | program = Fexpand_file_name (program, Qnil); | 3233 | program = Fexpand_file_name (program, Qnil); |
| 3234 | encoded_progname = ENCODE_FILE (program); | 3234 | encoded_progname = Fcopy_sequence (ENCODE_FILE (program)); |
| 3235 | progname = SSDATA (encoded_progname); | 3235 | progname = SSDATA (encoded_progname); |
| 3236 | unixtodos_filename (progname); | 3236 | unixtodos_filename (progname); |
| 3237 | filename_to_ansi (progname, progname_a); | 3237 | filename_to_ansi (progname, progname_a); |