diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-04-30 10:42:05 +0200 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-05-01 11:23:46 +0200 |
commit | 1eaaff3fc5b96daa366c67a5ee066a5eb000bb56 (patch) | |
tree | 998ac23949eb95f60be8cae0ba86dbab2096510d | |
parent | 33adbf31399c7069386b6c72f9d15e67f9f569e0 (diff) | |
download | rneovim-1eaaff3fc5b96daa366c67a5ee066a5eb000bb56.tar.gz rneovim-1eaaff3fc5b96daa366c67a5ee066a5eb000bb56.tar.bz2 rneovim-1eaaff3fc5b96daa366c67a5ee066a5eb000bb56.zip |
Fix warnings: ex_docmd.c: ex_tabonly(): Np dereference: FP.
Problem : Dereference of null pointer @ 5816.
Diagnostic : False positive.
Rationale : first_tabpage is assumed to be NULL after calling
goto_tabpage(), which should not be possible (first_tabpage
should be not NULL before calling it, and only changed to
another valid tab page).
Resolution : Assert first_tabpage after calling goto_tabpage().
Helped-by: oni-link <knil.ino@gmail.com>
-rw-r--r-- | src/nvim/ex_docmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 646d64f9f8..e81f99ccea 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5813,6 +5813,7 @@ static void ex_tabonly(exarg_T *eap) break; } } + assert(first_tabpage); if (first_tabpage->tp_next == NULL) { break; } |