diff options
| author | 2020-05-05 17:14:42 +0530 | |
|---|---|---|
| committer | 2020-05-05 17:14:42 +0530 | |
| commit | 6ee257920dd4ca97146407adf1030d7249366846 (patch) | |
| tree | 04e5498fa3ea36af3150ee3257183d7bb7ac903e | |
| parent | a9505103429a26209ba6b57bcb140d83621bf3ad (diff) | |
| download | nnn-6ee257920dd4ca97146407adf1030d7249366846.tar.gz | |
Fix context range check
| -rw-r--r-- | plugins/README.md | 2 | ||||
| -rw-r--r-- | src/nnn.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/README.md b/plugins/README.md index 292c06b..3ea9949 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -188,7 +188,7 @@ Usage examples can be found in the Examples section below. #### Get notified on file hover -If `NNN_FIFO` is set, `nnn` will open it and write every hovered files. This can be used in plugins, e.g. to implement file previews. +If `NNN_FIFO` is set, `nnn` will open it and write every hovered files. This can be used in plugins and external scripts, e.g. to implement file previews. If a `NNN_FIFO` is set globally, each `nnn` instance will write to it, and a process reading from the pipe will get hovered path from every instance, interleaved. @@ -4258,7 +4258,7 @@ static void readpipe(int fd, char **path, char **lastname, char **lastdir) ctx = r + 1; } else { ctx = g_buf[0] - '0'; - if (ctx > CTX_MAX) + if (ctx < 0 || ctx > CTX_MAX) return; } |