From: Maks Mishin <[email protected]>
Signed-off-by: Maks Mishin <[email protected]>
---
editors/vi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/editors/vi.c b/editors/vi.c
index 2645afe..8dd45ef 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1990,6 +1990,9 @@ static int file_insert(const char *fn, char *p, int
initial)
if (p > end)
p = end;
+ if (fn == NULL)
+ return cnt;
+
fd = open(fn, O_RDONLY);
if (fd < 0) {
if (!initial)
--
2.43.0
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox