vim/CVE-2019-12735.patch
openeuler-basic bc66a8c656 init package
2019-12-26 15:22:11 +08:00

16 lines
469 B
Diff

--- a/src/getchar.c 2018-10-03 04:24:53.000000000 -0400
+++ b/src/getchar_1.c 2019-06-18 23:02:45.377000000 -0400
@@ -1433,6 +1433,12 @@ openscript(
EMSG(_(e_nesting));
return;
}
+
+ // Disallow sourcing a file in the sandbox, the commands would be executed
+ // later, possibly outside of the sandbox.
+ if (check_secure())
+ return;
+
#ifdef FEAT_EVAL
if (ignore_script)
/* Not reading from script, also don't open one. Warning message? */