Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter(), map() の第2引数が number だと SEGV する #925

Closed
ichizok opened this issue Jul 8, 2016 · 3 comments
Closed

filter(), map() の第2引数が number だと SEGV する #925

ichizok opened this issue Jul 8, 2016 · 3 comments

Comments

@ichizok
Copy link
Member

ichizok commented Jul 8, 2016

質問・報告の内容

filter(), map() の第2引数が number だと SEGV します。

call filter([0], 0)

Vimのバージョン

7.4.1989 以降 (7.4.2000まで確認)

原因

https://github.com/vim/vim/blob/245a7cb/src/eval.c#L12054
https://github.com/vim/vim/blob/245a7cb/src/eval.c#L12073

expr の型を確認せずに skipwhite() を呼んでいます。

@ichizok
Copy link
Member Author

ichizok commented Jul 8, 2016

https://gist.github.com/ichizok/edca7401330a988501993e170d1388e8
7.4.1989 以前と同様に get_tv_string_buf_chk()char_u * に変換

@ichizok
Copy link
Member Author

ichizok commented Jul 8, 2016

@k-takata
Copy link
Member

k-takata commented Jul 9, 2016

修正ありがとうございます。取り込まれました。
7.4.2002
https://groups.google.com/d/topic/vim_dev/J1GemCb68rc/discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants