diff src/beval.c @ 16429:a1229400434a v8.1.1219

patch 8.1.1219: not checking for NULL return from alloc() commit https://github.com/vim/vim/commit/6ee9658774942f7448af700fc04df0335796a3db Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 27 22:06:37 2019 +0200 patch 8.1.1219: not checking for NULL return from alloc() Problem: Not checking for NULL return from alloc(). Solution: Add checks. (Martin Kunev, closes https://github.com/vim/vim/issues/4303, closes https://github.com/vim/vim/issues/4174)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Apr 2019 22:15:05 +0200
parents 41fbbcea0f1b
children 5ed4965ebc7b
line wrap: on
line diff
--- a/src/beval.c
+++ b/src/beval.c
@@ -127,6 +127,8 @@ get_beval_info(
 #ifdef FEAT_VARTABS
 		vim_free(beval->vts);
 		beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array);
+		if (wp->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
+		    return FAIL;
 #endif
 		beval->ts = wp->w_buffer->b_p_ts;
 		return OK;