aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-10-08 08:10:57 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-10-08 08:10:57 +0000
commita46addc87f5705476f1104b878c87291d85eb840 (patch)
treebbcee4a58f93aa67a5abc4a10d872dc0fa1de629 /findutils
parent3d3bacd7d94c035e3acc6f79478291d58a2636ff (diff)
downloadbusybox-w32-a46addc87f5705476f1104b878c87291d85eb840.tar.gz
busybox-w32-a46addc87f5705476f1104b878c87291d85eb840.tar.bz2
busybox-w32-a46addc87f5705476f1104b878c87291d85eb840.zip
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 git-svn-id: svn://busybox.net/trunk/busybox@9324 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'findutils')
-rw-r--r--findutils/grep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index ddc5cea9c..29f4ecd4f 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -249,9 +249,9 @@ static void load_regexes_from_file(llist_t *fopt)
249 fopt = cur->link; 249 fopt = cur->link;
250 free(cur); 250 free(cur);
251 f = bb_xfopen(ffile, "r"); 251 f = bb_xfopen(ffile, "r");
252 while ((line = bb_get_chomped_line_from_file(f)) != NULL) { 252 while ((line = bb_get_chomped_line_from_file(f)) != NULL) {
253 pattern_head = llist_add_to(pattern_head, line); 253 pattern_head = llist_add_to(pattern_head, line);
254 } 254 }
255 } 255 }
256} 256}
257 257
@@ -261,7 +261,7 @@ extern int grep_main(int argc, char **argv)
261 FILE *file; 261 FILE *file;
262 int matched; 262 int matched;
263 unsigned long opt; 263 unsigned long opt;
264 llist_t *fopt; 264 llist_t *fopt = NULL;
265 265
266 /* do normal option parsing */ 266 /* do normal option parsing */
267#ifdef CONFIG_FEATURE_GREP_CONTEXT 267#ifdef CONFIG_FEATURE_GREP_CONTEXT