summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 1.33.21_33_21_33_stableDenys Vlasenko2021-11-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix handling of "cmd && &"Denys Vlasenko2021-11-231-1/+5
| | | | | | | | function old new delta done_pipe 213 231 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> (cherry picked from commit 83a4967e50422867f340328d404994553e56b839)
* hush: fix handling of \^C and "^C"Denys Vlasenko2021-11-239-0/+23
| | | | | | | | | | | function old new delta parse_stream 2238 2252 +14 encode_string 243 256 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0) Total: 27 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> (cherry picked from commit 1b7a9b68d0e9aa19147d7fda16eb9a6b54156985)
* ash: parser: Fix VSLENGTH parsing with trailing garbageDenys Vlasenko2021-11-231-6/+3
| | | | | | | | Let's adopt Herbert Xu's patch, not waiting for it to reach dash git: hush already has a similar fix. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> (cherry picked from commit 53a7a9cd8c15d64fcc2278cf8981ba526dfbe0d2)
* unlzma: fix a case where we could read before beginning of bufferDenys Vlasenko2021-11-233-5/+17
| | | | | | | | | | | | | | | | Testcase: 21 01 01 00 00 00 00 00 e7 01 01 01 ef 00 df b6 00 17 02 10 11 0f ff 00 16 00 00 Unfortunately, the bug is not reliably causing a segfault, the behavior depends on what's in memory before the buffer. function old new delta unpack_lzma_stream 2762 2768 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> (cherry picked from commit 04f052c56ded5ab6a904e3a264a73dc0412b2e78)
* Bump version to 1.33.11_33_1Denys Vlasenko2021-05-031-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix ${unset_var/pattern/repl}Denys Vlasenko2021-05-033-1/+5
| | | | | | | function old new delta subevalvar 1349 1353 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decompress_gunzip: Fix DoS if gzip is corruptSamuel Sapalski2021-05-031-2/+10
| | | | | | | | | | | | | | On certain corrupt gzip files, huft_build will set the error bit on the result pointer. If afterwards abort_unzip is called huft_free might run into a segmentation fault or an invalid pointer to free(p). In order to mitigate this, we check in huft_free if the error bit is set and clear it before the linked list is freed. Signed-off-by: Samuel Sapalski <samuel.sapalski@nokia.com> Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: fix option parsingDenys Vlasenko2021-03-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update_passwd: fix context variableBernd Kuhls2021-03-091-1/+1
| | | | | | | | | | | | | | | | | Commit https://git.busybox.net/busybox/commit/libbb/update_passwd.c?id=2496616b0a8d1c80cd1416b73a4847b59b9f969a changed the variable used from context to seuser but forgot this change resulting in build errors detected by buildroot autobuilders: http://autobuild.buildroot.net/results/b89/b89b7d0f0601bb706e76cea31cf4e43326e5540c//build-end.log libbb/update_passwd.c:51:11: error: 'context' undeclared (first use in this function); did you mean 'ucontext'? freecon(context); Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make a strdup copy of $HISTFILE for line editingDenys Vlasenko2021-03-091-2/+2
| | | | | | | | | Otherwise if $HISTFILE is unset or reassigned, bad things can happen. function old new delta ash_main 1210 1218 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: fix offset for sendfileMaxim Storchak2021-03-091-3/+3
| | | | | | | | | | | | | | | If the Range: header is not present it the request, the offset passed to sendfile is wrong, and httpd falls back to the read-write loop. function old new delta send_file_and_exit 857 865 +8 handle_incoming_and_exit 2239 2230 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 8/-9) Total: -1 bytes Signed-off-by: Maxim Storchak <m.storchak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Bump version to 1.33.01_33_0Denys Vlasenko2020-12-291-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libiproute: band-aid for old uclibc missing IFA_FLAGSDenys Vlasenko2020-12-291-1/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe-small: convert to new recursive_action() APIDenys Vlasenko2020-12-291-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bc: placate gcc (it thinks 's' can be uninitialized here)Denys Vlasenko2020-12-291-8/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2020-12-2913-18/+45
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: make comment more clearDenys Vlasenko2020-12-271-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* man: implement SECTION parametersDenys Vlasenko2020-12-271-6/+35
| | | | | | | | | | function old new delta man_main 807 942 +135 is_section_name - 52 +52 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 187/0) Total: 187 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixDenys Vlasenko2020-12-252-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix this case: echo "SCRIPT" | hushDenys Vlasenko2020-12-255-1/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: if !EDITING, do not regenerate prompt for every input charDenys Vlasenko2020-12-251-5/+12
| | | | | | | | | | function old new delta fgetc_interactive 261 258 -3 pseudo_exec_argv 406 399 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: Surround syslog.h with the config checkLauri Kasanen2020-12-251-0/+2
| | | | | | | | This lets bb mount build for limited targets without syslog.h, as long as the parts using it like NFS are disabled. Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: change "clear ungetc counter on syntax errors" fix to match dashDenys Vlasenko2020-12-241-2/+1
| | | | | | | | | | function old new delta ash_main 1203 1210 +7 raise_exception 39 26 -13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-13) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix ^C in INTERACTIVE, !EDITING configDenys Vlasenko2020-12-231-6/+29
| | | | | | | | | | function old new delta refill_HFILE_and_getc 88 170 +82 fgetc_interactive 226 250 +24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 106/0) Total: 106 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: revert "make interactive ^C break out of PS2 mode"Denys Vlasenko2020-12-231-22/+3
| | | | | | | | | | | | | | | | | It made ^C break out of the entire shell, if we aren't in PS2 mode. Need a better idea. function old new delta expand_one_var 2344 2353 +9 syntax_error_unterm_ch 21 29 +8 parse_dollar 817 824 +7 parse_stream 2251 2238 -13 fgetc_interactive 249 227 -22 syntax_error_unterm_str 26 - -26 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 3/2 up/down: 24/-61) Total: -37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix PS1 prompth in !EDITING configDenys Vlasenko2020-12-231-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix fallout from tweaking ${var:START:LEN} codeDenys Vlasenko2020-12-233-1/+4
| | | | | | | function old new delta expand_one_var 2344 2353 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shell: for signal exitcode, use 128 | sig, not 128 + sig - MIPS has signal 128Denys Vlasenko2020-12-232-16/+18
| | | | | | | | | | | | | | | function old new delta wait_for_child_or_signal 213 214 +1 refill_HFILE_and_getc 89 88 -1 getstatus 97 96 -1 builtin_wait 339 337 -2 checkjobs 187 183 -4 process_wait_result 450 444 -6 waitcmd 290 281 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 1/-23) Total: -22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix commentDenys Vlasenko2020-12-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: fix commentDenys Vlasenko2020-12-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: detect squaresDenys Vlasenko2020-12-222-3/+62
| | | | | | | | | | | | | | | | | | | | | | | If we have a square, the speedup can be extremely large (in best case example below, it's ~40000 times faster): $ time ./busybox_old factor 18446743988964486098 18446743988964486098: 2 3037000493 3037000493 real 0m4.246s $ time ./busybox factor 18446743988964486098 18446743988964486098: 2 3037000493 3037000493 real 0m0.000s function old new delta isqrt_odd - 57 +57 print_w - 36 +36 factorize 218 236 +18 print_h - 7 +7 factorize_numstr 65 72 +7 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/0 up/down: 125/0) Total: 125 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: code shrinkDenys Vlasenko2020-12-211-5/+5
| | | | | | | function old new delta read_line_input 3171 3157 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: add a comment about possible use of tcflush()Denys Vlasenko2020-12-211-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bc: do not allocate line editing state until neededDenys Vlasenko2020-12-215-30/+35
| | | | | | | | | | | function old new delta xc_read_line 324 353 +29 free_line_input_t 34 39 +5 xc_vm_init 656 640 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-16) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe: Add support for modprobe.blacklist=module1,module2,...Andy Shevchenko2020-12-211-0/+19
| | | | | | | | | | | | function old new delta parse_and_add_kcmdline_module_options - 186 +186 modprobe_main 713 798 +85 do_modprobe 648 451 -197 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 271/-197) Total: 74 bytes Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: deal with FIXMEs for corner cases in parameter expansionDenys Vlasenko2020-12-211-18/+34
| | | | | | | function old new delta expand_one_var 2323 2344 +21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: fix typo in undefDenys Vlasenko2020-12-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: code shrinkDenys Vlasenko2020-12-211-9/+8
| | | | | | | function old new delta factor_main 176 171 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* factor: 30% faster trial division (better sieve)Denys Vlasenko2020-12-201-75/+95
| | | | | | | | | | | function old new delta packed_wheel - 192 +192 factor_main 108 176 +68 factorize 284 218 -66 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 260/-66) Total: 194 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: remove one redundant getpid() on every startupDenys Vlasenko2020-12-201-8/+6
| | | | | | | function old new delta hush_main 1151 1147 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping6: add -w/-W NUM to --helpDenys Vlasenko2020-12-201-6/+10
| | | | | | | function old new delta packed_usage 33515 33533 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping: fix -wN to not think that one packet is always lostDenys Vlasenko2020-12-201-5/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: clear ungetc counter on syntax errorsDenys Vlasenko2020-12-191-55/+57
| | | | | | | function old new delta raise_exception 26 39 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tftp: fix --helpDenys Vlasenko2020-12-191-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* route: code shrinkDenys Vlasenko2020-12-191-33/+26
| | | | | | | | | | | | | function old new delta kw_lookup 84 86 +2 tbl_hash_net_host 15 14 -1 tbl_verb 21 19 -2 tbl_ipvx 104 92 -12 packed_usage 33527 33493 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 2/-49) Total: -47 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text tweaks, mainly expanding one for routeDenys Vlasenko2020-12-184-19/+22
| | | | | | | function old new delta packed_usage 33485 33527 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text: use -P PORT formDenys Vlasenko2020-12-183-6/+6
| | | | | | | function old new delta packed_usage 33502 33491 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text tweaksDenys Vlasenko2020-12-1819-79/+77
| | | | | | | function old new delta packed_usage 33570 33502 -68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: if we race with other loop mount, we forget to close loop devDenys Vlasenko2020-12-171-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>