comparison src/eval.c @ 30433:36f1b763ae16 v9.0.0552

patch 9.0.0552: crash when using NUL in buffer that uses :source Commit: https://github.com/vim/vim/commit/69082916c8b5d321545d60b9f5facad0a2dd5a4e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 22 21:35:19 2022 +0100 patch 9.0.0552: crash when using NUL in buffer that uses :source Problem: Crash when using NUL in buffer that uses :source. Solution: Don't get a next line when skipping over NL.
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Sep 2022 22:45:04 +0200
parents fc0830246f49
children d77a900f6094
comparison
equal deleted inserted replaced
30432:8b800cb5fb8b 30433:36f1b763ae16
251 int r; 251 int r;
252 252
253 if (fc == NULL) 253 if (fc == NULL)
254 return FAIL; 254 return FAIL;
255 255
256 // Shortcut to call a compiled function without overhead. 256 // Shortcut to call a compiled function with minimal overhead.
257 r = call_def_function(partial->pt_func, argc, argv, 257 r = call_def_function(partial->pt_func, argc, argv,
258 DEF_USE_PT_ARGV, partial, fc, rettv); 258 DEF_USE_PT_ARGV, partial, fc, rettv);
259 remove_funccal(); 259 remove_funccal();
260 if (r == FAIL) 260 if (r == FAIL)
261 return FAIL; 261 return FAIL;
2289 else 2289 else
2290 next = peek_next_line_from_context(evalarg->eval_cctx); 2290 next = peek_next_line_from_context(evalarg->eval_cctx);
2291 2291
2292 if (next != NULL) 2292 if (next != NULL)
2293 { 2293 {
2294 *getnext = TRUE; 2294 *getnext = *p != NL;
2295 return skipwhite(next); 2295 return skipwhite(next);
2296 } 2296 }
2297 } 2297 }
2298 return p; 2298 return p;
2299 } 2299 }