summaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r--coreutils/cut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 0d95ff8..3c9fdbd 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -50,7 +50,7 @@ static void cut_file(FILE *file, char delim, const struct cut_list *cut_lists, u
/* set up a list so we can keep track of what's been printed */
int linelen = strlen(line);
- char *printed = xzalloc(linelen * sizeof(char));
+ char *printed = xzalloc(linelen + 1);
char *orig_line = line;
unsigned cl_pos = 0;
int spos;