diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
| commit | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch) | |
| tree | 05127e986021176649f2dd660a92ef8b8e107e92 /findutils | |
| parent | e6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff) | |
| download | busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.gz busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.tar.bz2 busybox-w32-47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5.zip | |
*: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils')
| -rw-r--r-- | findutils/find.c | 1 | ||||
| -rw-r--r-- | findutils/grep.c | 1 | ||||
| -rw-r--r-- | findutils/xargs.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/findutils/find.c b/findutils/find.c index 32d830337..d71c69782 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
| @@ -424,6 +424,7 @@ struct globals { | |||
| 424 | } FIX_ALIASING; | 424 | } FIX_ALIASING; |
| 425 | #define G (*(struct globals*)bb_common_bufsiz1) | 425 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 426 | #define INIT_G() do { \ | 426 | #define INIT_G() do { \ |
| 427 | setup_common_bufsiz(); \ | ||
| 427 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 428 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
| 428 | /* we have to zero it out because of NOEXEC */ \ | 429 | /* we have to zero it out because of NOEXEC */ \ |
| 429 | memset(&G, 0, sizeof(G)); \ | 430 | memset(&G, 0, sizeof(G)); \ |
diff --git a/findutils/grep.c b/findutils/grep.c index a669ac80b..b072cd441 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
| @@ -204,6 +204,7 @@ struct globals { | |||
| 204 | } FIX_ALIASING; | 204 | } FIX_ALIASING; |
| 205 | #define G (*(struct globals*)bb_common_bufsiz1) | 205 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 206 | #define INIT_G() do { \ | 206 | #define INIT_G() do { \ |
| 207 | setup_common_bufsiz(); \ | ||
| 207 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 208 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
| 208 | } while (0) | 209 | } while (0) |
| 209 | #define max_matches (G.max_matches ) | 210 | #define max_matches (G.max_matches ) |
diff --git a/findutils/xargs.c b/findutils/xargs.c index bfbd94960..ae01a49be 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
| @@ -103,6 +103,7 @@ struct globals { | |||
| 103 | } FIX_ALIASING; | 103 | } FIX_ALIASING; |
| 104 | #define G (*(struct globals*)bb_common_bufsiz1) | 104 | #define G (*(struct globals*)bb_common_bufsiz1) |
| 105 | #define INIT_G() do { \ | 105 | #define INIT_G() do { \ |
| 106 | setup_common_bufsiz(); \ | ||
| 106 | G.eof_str = NULL; /* need to clear by hand because we are NOEXEC applet */ \ | 107 | G.eof_str = NULL; /* need to clear by hand because we are NOEXEC applet */ \ |
| 107 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.repl_str = "{}";) \ | 108 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.repl_str = "{}";) \ |
| 108 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.eol_ch = '\n';) \ | 109 | IF_FEATURE_XARGS_SUPPORT_REPL_STR(G.eol_ch = '\n';) \ |
