comparison src/eval.c @ 16036:89fb86821b4a v8.1.1023

patch 8.1.1023: may use NULL pointer when indexing a blob commit https://github.com/vim/vim/commit/61be376337b0374d55a4b1d8206b2ec87ca54252 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 19 23:04:17 2019 +0100 patch 8.1.1023: may use NULL pointer when indexing a blob Problem: May use NULL pointer when indexing a blob. (Coverity) Solution: Break out of loop after using index on blob
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Mar 2019 23:15:05 +0100
parents 93b08b92a049
children 78faa25f9698
comparison
equal deleted inserted replaced
16035:3aef7d9ea3f9 16036:89fb86821b4a
2206 return NULL; 2206 return NULL;
2207 } 2207 }
2208 } 2208 }
2209 lp->ll_blob = lp->ll_tv->vval.v_blob; 2209 lp->ll_blob = lp->ll_tv->vval.v_blob;
2210 lp->ll_tv = NULL; 2210 lp->ll_tv = NULL;
2211 break;
2211 } 2212 }
2212 else 2213 else
2213 { 2214 {
2214 /* 2215 /*
2215 * Get the number and item for the only or first index of the List. 2216 * Get the number and item for the only or first index of the List.
9217 vim_free(p); 9218 vim_free(p);
9218 } 9219 }
9219 } 9220 }
9220 } 9221 }
9221 9222
9222 /* reset v:option_new, v:option_old and v:option_type */ 9223 /*
9224 * Reset v:option_new, v:option_old and v:option_type.
9225 */
9223 void 9226 void
9224 reset_v_option_vars(void) 9227 reset_v_option_vars(void)
9225 { 9228 {
9226 set_vim_var_string(VV_OPTION_NEW, NULL, -1); 9229 set_vim_var_string(VV_OPTION_NEW, NULL, -1);
9227 set_vim_var_string(VV_OPTION_OLD, NULL, -1); 9230 set_vim_var_string(VV_OPTION_OLD, NULL, -1);