mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.0.0648: possible use of NULL pointer
Problem: Possible use of NULL pointer if buflist_new() returns NULL. (Coverity) Solution: Check for NULL pointer in set_bufref().
This commit is contained in:
parent
06f1ed2f78
commit
fadacf01d0
@ -372,7 +372,7 @@ open_buffer(
|
||||
set_bufref(bufref_T *bufref, buf_T *buf)
|
||||
{
|
||||
bufref->br_buf = buf;
|
||||
bufref->br_fnum = buf->b_fnum;
|
||||
bufref->br_fnum = buf == NULL ? 0 : buf->b_fnum;
|
||||
bufref->br_buf_free_count = buf_free_count;
|
||||
}
|
||||
|
||||
|
@ -764,6 +764,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
648,
|
||||
/**/
|
||||
647,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user