summaryrefslogtreecommitdiff
path: root/src/w32.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-07-30 19:50:51 +0300
committerEli Zaretskii <eliz@gnu.org>2015-07-30 19:50:51 +0300
commitf3f15aef9a2d79252ec061093c25160f29809976 (patch)
tree2c309a0e9c153ff79a3f8a265decdd2712e8f003 /src/w32.c
parent91718f5f451aa99aaf9e4c48ecfc4d5c0535dc79 (diff)
downloademacs-f3f15aef9a2d79252ec061093c25160f29809976.tar.gz
Support long URLs in w32-shell-execute
* src/w32fns.c (Fw32_shell_execute): Don't use filename_to_utf16 and filename_to_ansi to convert the DOCUMENT argument, as it could be a URL that is not limited to MAX_PATH characters. Instead, use MultiByteToWideChar directly, and allocate heap storage as required to accommodate the converted string. Likewise with non-Unicode operation. Ensure OPERATION is null-terminated, even if it is longer than 32K bytes. (Bug#21158)
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/w32.c b/src/w32.c
index 8721ed919fc..296729a0e0b 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1490,7 +1490,7 @@ static int file_name_codepage;
/* Produce a Windows ANSI codepage suitable for encoding file names.
Return the information about that codepage in CP_INFO. */
-static int
+int
codepage_for_filenames (CPINFO *cp_info)
{
/* A simple cache to avoid calling GetCPInfo every time we need to