projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69ed309
)
cut: fix buffer overflow (bug 4544).
author
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 15 Aug 2008 21:20:23 +0000
(21:20 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Fri, 15 Aug 2008 21:20:23 +0000
(21:20 -0000)
coreutils/cut.c
patch
|
blob
|
history
diff --git
a/coreutils/cut.c
b/coreutils/cut.c
index 0d95ff84fa2f6b23f42b32108edb3b2266da035f..3c9fdbda378239b45063e4be3e12e638ceac332d 100644
(file)
--- 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;