about summary refs log tree commit diff
path: root/nq.c
diff options
context:
space:
mode:
Diffstat (limited to 'nq.c')
-rw-r--r--nq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nq.c b/nq.c
index 178626b..5fe69bf 100644
--- a/nq.c
+++ b/nq.c
@@ -309,7 +309,8 @@ again:
 			/* wait for all older ,* files than ours.  */
 
 			if (!(ent->d_name[0] == ',' &&
-			    strcmp(ent->d_name, lockfile+1) < 0))
+			    strcmp(ent->d_name, lockfile+1) < 0 &&
+			    strlen(ent->d_name) < sizeof(newestlocked)))
 				continue;
 
 			int fd = openat(dirfd, ent->d_name, O_RDWR);