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.
diff --git a/src/eval.c b/src/eval.c
index 1f43970..77f0d7f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -253,7 +253,7 @@
if (fc == NULL)
return FAIL;
- // Shortcut to call a compiled function without overhead.
+ // Shortcut to call a compiled function with minimal overhead.
r = call_def_function(partial->pt_func, argc, argv,
DEF_USE_PT_ARGV, partial, fc, rettv);
remove_funccal();
@@ -2291,7 +2291,7 @@
if (next != NULL)
{
- *getnext = TRUE;
+ *getnext = *p != NL;
return skipwhite(next);
}
}