aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-05 17:14:42 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-05-05 17:14:42 +0530
commit6ee257920dd4ca97146407adf1030d7249366846 (patch)
tree04e5498fa3ea36af3150ee3257183d7bb7ac903e /src
parenta9505103429a26209ba6b57bcb140d83621bf3ad (diff)
downloadnnn-6ee257920dd4ca97146407adf1030d7249366846.tar.gz
Fix context range check
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index e646393..f915ca7 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -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;
}