Subject: bug#6126: 24.0.50; Segmentation fault when w32-shell-execute try to open an unassociated file

From: Chunyu Wang <[email-masked]>
Date: Fri, 7 May 2010 09:52:42 +0800

2010/5/7 Lennart Borgman <[email-masked]>:
> ...
> I do not understand C code but here are some small observations:
>
> - In w32_error the argument error_no has type int. It should be more
> easy to understand if it had the type DWORD which is what GetLastError
> returns. Will using int be correct on all w32 platforms?
Sorry, I have no idea completely.

> - The call to error in w32-shell-execute has only two arguments. Is
> that correct? error in eval.c takes four arguments.

(w32-shell-execute OPERATION DOCUMENT &optional PARAMETERS SHOW-FLAG)
The last two are optional, but emacs crashed even if called with them.

> - The parameter lpBuffer to FormatMessage has the type LPTSTR. Is it
> correct to call that with *char (ie buf)? It looks in the backtrace
> like even the argument a1 to error is incorrect.
no idea too.

-- 
Harbin Institute of Technology, China
Chunyu Wang