Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcc5b0e6ca | ||
|
|
611bbfc148 | ||
|
|
23dd1c75b7 | ||
|
|
89358a7131 | ||
|
|
39b71881b8 | ||
|
|
67cc582d42 | ||
|
|
ee1e0987e4 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
VERSION = 1
|
||||
PATCHLEVEL = 33
|
||||
SUBLEVEL = 0
|
||||
SUBLEVEL = 1
|
||||
EXTRAVERSION =
|
||||
NAME = Unnamed
|
||||
|
||||
|
||||
@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = {
|
||||
* each table.
|
||||
* t: table to free
|
||||
*/
|
||||
#define BAD_HUFT(p) ((uintptr_t)(p) & 1)
|
||||
#define ERR_RET ((huft_t*)(uintptr_t)1)
|
||||
static void huft_free(huft_t *p)
|
||||
{
|
||||
huft_t *q;
|
||||
|
||||
/*
|
||||
* If 'p' has the error bit set we have to clear it, otherwise we might run
|
||||
* into a segmentation fault or an invalid pointer to free(p)
|
||||
*/
|
||||
if (BAD_HUFT(p)) {
|
||||
p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET));
|
||||
}
|
||||
|
||||
/* Go through linked list, freeing from the malloced (t[-1]) address. */
|
||||
while (p) {
|
||||
q = (--p)->v.t;
|
||||
@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PARAM unsigned bitbuffer, unsigned *current
|
||||
* or a valid pointer to a Huffman table, ORed with 0x1 if incompete table
|
||||
* is given: "fixed inflate" decoder feeds us such data.
|
||||
*/
|
||||
#define BAD_HUFT(p) ((uintptr_t)(p) & 1)
|
||||
#define ERR_RET ((huft_t*)(uintptr_t)1)
|
||||
static huft_t* huft_build(const unsigned *b, const unsigned n,
|
||||
const unsigned s, const struct cp_ext *cp_ext,
|
||||
unsigned *m)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
+4
-3
@@ -7011,7 +7011,8 @@ subevalvar(char *start, char *str, int strloc,
|
||||
slash_pos = -1;
|
||||
if (repl) {
|
||||
slash_pos = expdest - ((char *)stackblock() + strloc);
|
||||
STPUTC('/', expdest);
|
||||
if (!(flag & EXP_DISCARD))
|
||||
STPUTC('/', expdest);
|
||||
//bb_error_msg("repl+1:'%s'", repl + 1);
|
||||
p = argstr(repl + 1, (flag & EXP_DISCARD) | EXP_TILDE); /* EXP_TILDE: echo "${v/x/~}" expands ~ ! */
|
||||
*repl = '/';
|
||||
@@ -14499,7 +14500,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 +14514,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);
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
|
||||
|
||||
Ok:0
|
||||
@@ -1,3 +1,5 @@
|
||||
unset v
|
||||
echo ${v/*/w}
|
||||
v=''
|
||||
echo ${v/*/w}
|
||||
echo Ok:$?
|
||||
Reference in new issue
Block a user