# HG changeset patch # User Christian Brabandt # Date 1497897903 -7200 # Node ID e349dc7889f5dc75c670c8eef3bee52105e8c24a # Parent e11879a5cc68d511508690efb60eb8df745f5b79 patch 8.0.0648: possible use of NULL pointer commit https://github.com/vim/vim/commit/fadacf01d0dbcc7a96ef5eee0ad57956eeab04d7 Author: Bram Moolenaar Date: Mon Jun 19 20:35:32 2017 +0200 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(). diff --git a/src/buffer.c b/src/buffer.c --- a/src/buffer.c +++ b/src/buffer.c @@ -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; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 648, +/**/ 647, /**/ 646,