diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-06-15 21:50:04 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-06-15 21:50:04 +0000 |
commit | b2e130732920de3c81b699b36c61dcc9ff23c69c (patch) | |
tree | a015bedb66aeddfb4603f8d705c755637cd35d02 /package/busybox | |
parent | 171557a1c1f861e4e623d2c7f7afe7c917ac5803 (diff) | |
download | upstream-b2e130732920de3c81b699b36c61dcc9ff23c69c.tar.gz upstream-b2e130732920de3c81b699b36c61dcc9ff23c69c.tar.bz2 upstream-b2e130732920de3c81b699b36c61dcc9ff23c69c.zip |
fix awk segfault
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7640 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/busybox')
-rw-r--r-- | package/busybox/patches/400-revert_awk_getopt.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/package/busybox/patches/400-revert_awk_getopt.patch b/package/busybox/patches/400-revert_awk_getopt.patch index d9c7cfb709..33c6790fe1 100644 --- a/package/busybox/patches/400-revert_awk_getopt.patch +++ b/package/busybox/patches/400-revert_awk_getopt.patch @@ -1,7 +1,7 @@ Index: busybox-1.4.2/editors/awk.c =================================================================== ---- busybox-1.4.2.orig/editors/awk.c 2007-06-04 13:21:32.083099296 +0200 -+++ busybox-1.4.2/editors/awk.c 2007-06-04 13:21:35.202625056 +0200 +--- busybox-1.4.2.orig/editors/awk.c 2007-06-15 23:43:26.460690280 +0200 ++++ busybox-1.4.2/editors/awk.c 2007-06-15 23:45:26.283474448 +0200 @@ -2639,14 +2639,13 @@ int awk_main(int argc, char **argv) @@ -18,7 +18,7 @@ Index: busybox-1.4.2/editors/awk.c /* Undo busybox.c, or else strtod may eat ','! This breaks parsing: * $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */ -@@ -2694,40 +2693,54 @@ +@@ -2694,40 +2693,56 @@ free(s); } @@ -83,13 +83,13 @@ Index: busybox-1.4.2/editors/awk.c - parse_program(s + 1); - free(s); - } else { // no -f: take program from 1st parameter -- if (!argc) -- bb_show_usage(); + } + argc -= optind; + argv += optind; + + if (!programname) { + if (!argc) + bb_show_usage(); programname = "cmd. line"; parse_program(*argv++); argc--; |