[vim/vim] Passing null_string as argument to substitute() in a def function crashes Vim (PR #18311)

7 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Sep 15, 2025, 9:57:28 PM (2 days ago) Sep 15
to vim/vim, Subscribed

Fix the issue reported in #18309.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18311

Commit Summary

  • 7aba40a Passing null_string as argument to substitute() in a def function crashes Vim

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311@github.com>

zeertzjq

unread,
Sep 15, 2025, 10:09:32 PM (2 days ago) Sep 15
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#18311)

Perhaps there is a similar problem with searchpair() as well? NULL is not checked here:

	    // {skip} argument of searchpair() can be compiled if not empty
	    if (isn->isn_type == ISN_PUSHS && *isn->isn_arg.string != NUL)
		compile_string(isn, cctx, 0);


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311/c3294589059@github.com>

Yegappan Lakshmanan

unread,
Sep 15, 2025, 10:40:11 PM (2 days ago) Sep 15
to vim/vim, Push

@yegappan pushed 1 commit.

  • 6af2b4f Fix a similar problem with the searchpair() function


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311/before/7aba40a9a3556e35be9d2b8f26bc382cea01da1c/after/6af2b4fa50d0e011b21ffabeccf47ad835d115f7@github.com>

Yegappan Lakshmanan

unread,
Sep 15, 2025, 10:40:34 PM (2 days ago) Sep 15
to vim/vim, Subscribed
yegappan left a comment (vim/vim#18311)

Perhaps there is a similar problem with searchpair() as well? NULL is not checked here:

	    // {skip} argument of searchpair() can be compiled if not empty
	    if (isn->isn_type == ISN_PUSHS && *isn->isn_arg.string != NUL)
		compile_string(isn, cctx, 0);

Yes. Thanks for noticing it. I have updated the PR with the fix for that also.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311/c3294639038@github.com>

Christian Brabandt

unread,
Sep 16, 2025, 3:20:12 PM (19 hours ago) Sep 16
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18311)

thanks


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311/c3300037166@github.com>

Christian Brabandt

unread,
Sep 16, 2025, 3:25:27 PM (19 hours ago) Sep 16
to vim/vim, Subscribed

Closed #18311 via afa2a81.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18311/issue_event/19734167698@github.com>

Reply all
Reply to author
Forward
0 new messages