Tuesday, October 1, 2019

Re: Vim crashes when executing system()



On Mon, Sep 30, 2019 at 9:19 PM Yasuhiro Matsumoto <mattn.jp@gmail.com> wrote:
Probably, I figure out this bug. Could you pleaes try this? (if possible)

diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9d58ab41a..2db573a4f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1791,8 +1791,11 @@ make_filter_cmd(
      if (p != NULL)
  *p = NUL;
  }
- STRCAT(buf, " <"); /* " < " causes problems on Amiga */
- STRCAT(buf, itmp);
+ if (itmp != NULL)
+ {
+     STRCAT(buf, " <"); /* " < " causes problems on Amiga */
+     STRCAT(buf, itmp);
+ }
  if (*p_shq == NUL)
  {
      p = find_pipe(cmd);


That alone causes this, but the crash doesn't happen:

shell returned 1
E485: Can't read file C:/Users/salman/AppData/Local/Temp/VIo223F.tmp

I'll try the patch you uploaded to github next because it contains more changes.

Thanks,

Salman
 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEeGSxAHX1A-BxNNeTQ5nztDOZV%3DJmp4kAjQLZDCPTejFg%40mail.gmail.com.

No comments: