In the function cs_find_common
,
https://github.com/vim/vim/blob/510ca80c58088276d8b1744a729f69d34c550566/src/if_cscope.c#L1231-L1235
char_u *tmp = vim_tempname('c', TRUE);
First the temporary file is created. Subsequently the temporary file is directly opened without checking if the temp file was successfully created:
f = mch_fopen((char *)tmp, "w");
A NULL check for tmp will suffice to prevent Null pointer dereference similar to how its used in other files:
https://github.com/vim/vim/blob/510ca80c58088276d8b1744a729f69d34c550566/src/diff.c#L955-L961
A NULL check for tmp before the temp file is opened
master
Ubuntu
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Please create a PR. THanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #18225 as completed via 12b9431.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.