summaryrefslogtreecommitdiff
path: root/src/shuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shuf.c')
-rw-r--r--src/shuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shuf.c b/src/shuf.c
index 39cfdfffb..68003c259 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -178,7 +178,7 @@ read_input (FILE *in, char eolbyte, char ***pline)
do
{
- if (alloc == used)
+ if (alloc <= used + 1)
{
if (alloc == SIZE_MAX)
xalloc_die ();