Support long URLs in w32-shell-execute
commitf3f15aef9a2d79252ec061093c25160f29809976
authorEli Zaretskii <eliz@gnu.org>
Thu, 30 Jul 2015 16:50:51 +0000 (30 19:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 30 Jul 2015 16:50:51 +0000 (30 19:50 +0300)
tree2c309a0e9c153ff79a3f8a265decdd2712e8f003
parent91718f5f451aa99aaf9e4c48ecfc4d5c0535dc79
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)
src/w32.c
src/w32.h
src/w32fns.c