summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-01-23 09:50:40 +0000
committerRon Yorston <rmy@pobox.com>2015-01-23 09:50:40 +0000
commit63dbf1908bc51918d9d963f4d9b7657306b2970d (patch)
tree781ebfdcbbb953688e06f3541ce9e0c71f1dadfa /libbb
parent06900749637b925af1ebdf5030ba03a379f4f84f (diff)
parent6968e081230fb6434a2a6f0eed39d538ea982f3f (diff)
downloadbusybox-w32-TIG_1_23_0.tar.gz
busybox-w32-TIG_1_23_0.tar.bz2
busybox-w32-TIG_1_23_0.zip
Merge commit '1_23_0' into mergeTIG_1_23_0
Conflicts: libbb/lineedit.c
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Kbuild.src1
-rw-r--r--libbb/sysconf.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index 1be87b337..d94b65008 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -144,6 +144,7 @@ lib-$(CONFIG_ADDUSER) += update_passwd.o
144lib-$(CONFIG_DELGROUP) += update_passwd.o 144lib-$(CONFIG_DELGROUP) += update_passwd.o
145lib-$(CONFIG_DELUSER) += update_passwd.o 145lib-$(CONFIG_DELUSER) += update_passwd.o
146 146
147lib-$(CONFIG_FTPD) += correct_password.o
147lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o 148lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o
148lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o 149lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o
149lib-$(CONFIG_CRYPTPW) += pw_encrypt.o 150lib-$(CONFIG_CRYPTPW) += pw_encrypt.o
diff --git a/libbb/sysconf.c b/libbb/sysconf.c
index cfad9cdc0..8c1caef5c 100644
--- a/libbb/sysconf.c
+++ b/libbb/sysconf.c
@@ -11,7 +11,15 @@
11#if !defined(bb_arg_max) 11#if !defined(bb_arg_max)
12unsigned FAST_FUNC bb_arg_max(void) 12unsigned FAST_FUNC bb_arg_max(void)
13{ 13{
14 return sysconf(_SC_ARG_MAX); 14 long r = sysconf(_SC_ARG_MAX);
15
16 /* I've seen a version of uclibc which returned -1.
17 * Guard about it, and also avoid insanely large values
18 */
19 if ((unsigned long)r > 64*1024*1024)
20 r = 64*1024*1024;
21
22 return r;
15} 23}
16#endif 24#endif
17 25