[git commit master] hush: use configured max line length, not BUFSIZE from libc

Denys Vlasenko vda.linux at googlemail.com
Mon Oct 19 14:34:39 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=aaa22d2493365ac97af0f4c72daf04b87f4b82cc
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/hush.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell/hush.c b/shell/hush.c
index 69a86b1..ae08c73 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -556,7 +556,7 @@ struct globals {
 	unsigned long memleak_value;
 	int debug_indent;
 #endif
-	char user_input_buf[ENABLE_FEATURE_EDITING ? BUFSIZ : 2];
+	char user_input_buf[ENABLE_FEATURE_EDITING ? CONFIG_FEATURE_EDITING_MAX_LEN : 2];
 };
 #define G (*ptr_to_globals)
 /* Not #defining name to G.name - this quickly gets unwieldy
@@ -1666,7 +1666,7 @@ static void get_user_input(struct in_str *i)
 		G.flag_SIGINT = 0;
 		/* buglet: SIGINT will not make new prompt to appear _at once_,
 		 * only after <Enter>. (^C will work) */
-		r = read_line_input(prompt_str, G.user_input_buf, BUFSIZ-1, G.line_input_state);
+		r = read_line_input(prompt_str, G.user_input_buf, CONFIG_FEATURE_EDITING_MAX_LEN-1, G.line_input_state);
 		/* catch *SIGINT* etc (^C is handled by read_line_input) */
 		check_and_run_traps(0);
 	} while (r == 0 || G.flag_SIGINT); /* repeat if ^C or SIGINT */
-- 
1.6.3.3



More information about the busybox-cvs mailing list