mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-21 20:28:06 +00:00
Defense in depth use O_NOFOLLOW when opening regular files
This commit is contained in:
parent
7616cfe854
commit
3c3133d339
1 changed files with 1 additions and 1 deletions
|
|
@ -952,7 +952,7 @@ drop_send_file_chunks(Window *w) {
|
|||
static bool
|
||||
drop_send_file_data(Window *w, const char *path) {
|
||||
drop_close_file_fd(w);
|
||||
int fd = safe_open(path, O_RDONLY | O_CLOEXEC | O_NONBLOCK, 0);
|
||||
int fd = safe_open(path, O_RDONLY | O_CLOEXEC | O_NONBLOCK | O_NOFOLLOW, 0);
|
||||
if (fd < 0) {
|
||||
switch (errno) {
|
||||
case ENOENT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue