* src/emacs.c (decode_path): make sure to return Qnil if
transcoding failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
(':' or whatever). */
Lisp_Object decode_path(/*const*/ char *path)
{
- Bytecount newlen;
- Bufbyte *newpath;
+ Bytecount newlen = 0;
+ Bufbyte *newpath = NULL;
if (!path)
return Qnil;
decode_env_path(), but it looks dubious here. Does any code
depend on decode_path("") returning nil instead of an empty
string? */
- if (!newlen)
+ if (!newlen || !newpath)
return Qnil;
return split_string_by_emchar_1(newpath, newlen, SEPCHAR);