Permalink
Browse files

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().
  • Loading branch information...
brammool committed Jun 19, 2017
1 parent 06f1ed2 commit fadacf01d0dbcc7a96ef5eee0ad57956eeab04d7
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/buffer.c
  2. +2 −0 src/version.c
View
@@ -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;
}
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
648,
/**/
647,
/**/

0 comments on commit fadacf0

Please sign in to comment.