aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/get_line_from_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c
index de49eb51d..722a904b5 100644
--- a/libbb/get_line_from_file.c
+++ b/libbb/get_line_from_file.c
@@ -41,6 +41,7 @@ char *bb_get_chunk_from_file(FILE * file, int *end)
free(linebuf);
return NULL;
}
+ linebuf = xrealloc(linebuf, idx+1);
linebuf[idx] = 0;
}
return linebuf;