Skip FZF_CURRENT_ITEM export for items larger than 64 KB
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled

A huge item can overflow ARG_MAX and break exec with E2BIG, failing
preview and other child commands. (#4806)
This commit is contained in:
Junegunn Choi
2026-06-23 20:50:12 +09:00
parent 109057877b
commit f2e451596c
4 changed files with 32 additions and 2 deletions
+3
View File
@@ -1534,6 +1534,9 @@ fzf exports the following environment variables to its child processes.
.PP
.B FZF_CURRENT_ITEM
is omitted when the item contains a NUL byte, because exec(2) cannot pass it.
It is also omitted when the item is larger than 64 KB, so that a huge item
cannot overflow the environment size limit and break preview and other child
commands.
.SH EXTENDED SEARCH MODE