aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2021-03-09 08:42:47 +0300
committerCem Keylan <cem@ckyln.com>2021-03-09 08:42:47 +0300
commit2106f384939b9627996a77dca7d4310c91f482d7 (patch)
treecf459a74499ea86f2c138b99487a97bb2860a829
parent09f572b1e859bfb103f654ac86541710d964d9aa (diff)
parent89358a7131d3e75c74af834bb117b4fad7914983 (diff)
downloadbusybox-2106f384939b9627996a77dca7d4310c91f482d7.tar.gz
Merge remote-tracking branch 'upstream/1_33_stable' into 1_33_stable1_33_stable
-rw-r--r--libbb/update_passwd.c2
-rw-r--r--networking/httpd.c6
-rw-r--r--networking/traceroute.c2
-rw-r--r--shell/ash.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/libbb/update_passwd.c b/libbb/update_passwd.c
index 7b67f30cd..a228075cc 100644
--- a/libbb/update_passwd.c
+++ b/libbb/update_passwd.c
@@ -48,7 +48,7 @@ static void check_selinux_update_passwd(const char *username)
bb_simple_error_msg_and_die("SELinux: access denied");
}
if (ENABLE_FEATURE_CLEAN_UP)
- freecon(context);
+ freecon(seuser);
}
#else
# define check_selinux_update_passwd(username) ((void)0)
diff --git a/networking/httpd.c b/networking/httpd.c
index 4346141ee..4c014bc71 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1871,7 +1871,7 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
send_headers(HTTP_OK);
#if ENABLE_FEATURE_USE_SENDFILE
{
- off_t offset = range_start;
+ off_t offset = (range_start < 0) ? 0 : range_start;
while (1) {
/* sz is rounded down to 64k */
ssize_t sz = MAXINT(ssize_t) - 0xffff;
@@ -2486,8 +2486,8 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
if (STRNCASECMP(iobuf, "Range:") == 0) {
/* We know only bytes=NNN-[MMM] */
char *s = skip_whitespace(iobuf + sizeof("Range:")-1);
- if (is_prefixed_with(s, "bytes=")) {
- s += sizeof("bytes=")-1;
+ s = is_prefixed_with(s, "bytes=");
+ if (s) {
range_start = BB_STRTOOFF(s, &s, 10);
if (s[0] != '-' || range_start < 0) {
range_start = -1;
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 3f1a9ab46..29f5e480b 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -896,7 +896,7 @@ traceroute_init(int op, char **argv)
op |= getopt32(argv, "^"
OPT_STRING
- "\0" "-1:x-x" /* minimum 1 arg */
+ "\0" "-1" /* minimum 1 arg */
, &tos_str, &device, &max_ttl_str, &port_str, &nprobes_str
, &source, &waittime_str, &pausemsecs_str, &first_ttl_str
);
diff --git a/shell/ash.c b/shell/ash.c
index f16d7fb6a..ecbfbf091 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14499,7 +14499,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
if (sflag || minusc == NULL) {
#if MAX_HISTORY > 0 && ENABLE_FEATURE_EDITING_SAVEHISTORY
- if (iflag) {
+ if (line_input_state) {
const char *hp = lookupvar("HISTFILE");
if (!hp) {
hp = lookupvar("HOME");
@@ -14513,7 +14513,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
}
}
if (hp)
- line_input_state->hist_file = hp;
+ line_input_state->hist_file = xstrdup(hp);
# if ENABLE_FEATURE_SH_HISTFILESIZE
hp = lookupvar("HISTFILESIZE");
line_input_state->max_history = size_from_HISTFILESIZE(hp);