Skip to content

Commit

Permalink
cut: fix buffer overflow (bug 4544).
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Vlasenko committed Aug 15, 2008
1 parent 69ed309 commit 8334db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coreutils/cut.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8334db1

Please sign in to comment.