From 1eaaff3fc5b96daa366c67a5ee066a5eb000bb56 Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Thu, 30 Apr 2015 10:42:05 +0200 Subject: 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 --- src/nvim/ex_docmd.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit