[BusyBox-cvs] CVS busybox/findutils
CVS User andersen
andersen at codepoet.org
Fri Oct 8 08:10:58 UTC 2004
Update of /var/cvs/busybox/findutils
In directory nail:/tmp/cvs-serv9938/findutils
Modified Files:
grep.c
Log Message:
Hiroshi Ito writes:
Hello
I'm using busy box on mipsel machine.
"grep -f file" will cause segmentation fault.
Vladimir N. Oleynik writes:
Hiroshi,
Thank for bug report, but your patch is full broken.
Worked patch attached.
(really changes is zero initialize, and indent correcting).
--w
vodz
--- /var/cvs/busybox/findutils/grep.c 2004/05/26 11:48:29 1.85
+++ /var/cvs/busybox/findutils/grep.c 2004/10/08 08:10:57 1.86
@@ -249,9 +249,9 @@
fopt = cur->link;
free(cur);
f = bb_xfopen(ffile, "r");
- while ((line = bb_get_chomped_line_from_file(f)) != NULL) {
- pattern_head = llist_add_to(pattern_head, line);
- }
+ while ((line = bb_get_chomped_line_from_file(f)) != NULL) {
+ pattern_head = llist_add_to(pattern_head, line);
+ }
}
}
@@ -261,7 +261,7 @@
FILE *file;
int matched;
unsigned long opt;
- llist_t *fopt;
+ llist_t *fopt = NULL;
/* do normal option parsing */
#ifdef CONFIG_FEATURE_GREP_CONTEXT
More information about the busybox-cvs
mailing list