mirror of
https://gitlab.com/dm38/padavan-ng.git
synced 2024-02-13 08:34:03 +08:00
uclibc: update to 1.0.37
This commit is contained in:
@ -128,7 +128,7 @@ export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
|
|||||||
# Now config hard core
|
# Now config hard core
|
||||||
MAJOR_VERSION := 1
|
MAJOR_VERSION := 1
|
||||||
MINOR_VERSION := 0
|
MINOR_VERSION := 0
|
||||||
SUBLEVEL := 36
|
SUBLEVEL := 37
|
||||||
EXTRAVERSION :=
|
EXTRAVERSION :=
|
||||||
VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
|
VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
|
||||||
ABI_VERSION := $(MAJOR_VERSION)
|
ABI_VERSION := $(MAJOR_VERSION)
|
||||||
|
@ -505,7 +505,7 @@ config UCLIBC_CTOR_DTOR
|
|||||||
|
|
||||||
config LDSO_GNU_HASH_SUPPORT
|
config LDSO_GNU_HASH_SUPPORT
|
||||||
bool "Enable GNU hash style support"
|
bool "Enable GNU hash style support"
|
||||||
depends on HAVE_SHARED
|
depends on HAVE_SHARED && !TARGET_mips
|
||||||
help
|
help
|
||||||
Newest binutils support a new hash style named GNU-hash. The dynamic
|
Newest binutils support a new hash style named GNU-hash. The dynamic
|
||||||
linker will use the new GNU-hash section (.gnu.hash) for symbol lookup
|
linker will use the new GNU-hash section (.gnu.hash) for symbol lookup
|
||||||
|
@ -1178,8 +1178,8 @@ int __dns_lookup(const char *name,
|
|||||||
struct resolv_answer *a)
|
struct resolv_answer *a)
|
||||||
{
|
{
|
||||||
/* Protected by __resolv_lock: */
|
/* Protected by __resolv_lock: */
|
||||||
// static int last_ns_num = 0;
|
static int last_ns_num = 0;
|
||||||
// static uint16_t last_id = 1;
|
static uint16_t last_id = 1;
|
||||||
|
|
||||||
int i, j, fd, rc;
|
int i, j, fd, rc;
|
||||||
int packet_len;
|
int packet_len;
|
||||||
@ -1258,12 +1258,12 @@ int __dns_lookup(const char *name,
|
|||||||
}
|
}
|
||||||
/* first time? pick starting server etc */
|
/* first time? pick starting server etc */
|
||||||
if (local_ns_num < 0) {
|
if (local_ns_num < 0) {
|
||||||
local_id = 1;
|
local_id = last_id;
|
||||||
/*TODO: implement /etc/resolv.conf's "options rotate"
|
/*TODO: implement /etc/resolv.conf's "options rotate"
|
||||||
(a.k.a. RES_ROTATE bit in _res.options)
|
(a.k.a. RES_ROTATE bit in _res.options)
|
||||||
local_ns_num = 0;
|
local_ns_num = 0;
|
||||||
if (_res.options & RES_ROTATE) */
|
if (_res.options & RES_ROTATE) */
|
||||||
local_ns_num = 0;
|
local_ns_num = last_ns_num;
|
||||||
retries_left = __nameservers * __resolv_attempts;
|
retries_left = __nameservers * __resolv_attempts;
|
||||||
}
|
}
|
||||||
if (local_ns_num >= __nameservers)
|
if (local_ns_num >= __nameservers)
|
||||||
@ -1271,8 +1271,8 @@ int __dns_lookup(const char *name,
|
|||||||
local_id++;
|
local_id++;
|
||||||
local_id &= 0xffff;
|
local_id &= 0xffff;
|
||||||
/* write new values back while still under lock */
|
/* write new values back while still under lock */
|
||||||
// last_id = local_id;
|
last_id = local_id;
|
||||||
// last_ns_num = local_ns_num;
|
last_ns_num = local_ns_num;
|
||||||
/* struct copy */
|
/* struct copy */
|
||||||
/* can't just take a pointer, __nameserver[x]
|
/* can't just take a pointer, __nameserver[x]
|
||||||
* is not safe to use outside of locks */
|
* is not safe to use outside of locks */
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
@ -28,6 +29,15 @@ void *malloc(size_t size)
|
|||||||
size++;
|
size++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* prevent Undefined Behaviour for pointer arithmetic (substract) of too big pointers
|
||||||
|
* see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303
|
||||||
|
* No need to check for size + sizeof(size_t) integer overflow since we already check for PTRDIFF_MAX
|
||||||
|
*/
|
||||||
|
if (unlikely(size > PTRDIFF_MAX)) {
|
||||||
|
__set_errno(ENOMEM);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __ARCH_USE_MMU__
|
#ifdef __ARCH_USE_MMU__
|
||||||
# define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
|
# define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
|
||||||
#else
|
#else
|
||||||
@ -148,6 +158,16 @@ void * memalign (size_t alignment, size_t size)
|
|||||||
void * result;
|
void * result;
|
||||||
unsigned long int adj;
|
unsigned long int adj;
|
||||||
|
|
||||||
|
if (unlikely(size > PTRDIFF_MAX)) {
|
||||||
|
__set_errno(ENOMEM);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unlikely((size + alignment - 1 < size) && (alignment != 0))) {
|
||||||
|
__set_errno(ENOMEM);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
result = malloc (size + alignment - 1);
|
result = malloc (size + alignment - 1);
|
||||||
if (result == NULL)
|
if (result == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <crypt.h>
|
#include <crypt.h>
|
||||||
|
#include <errno.h>
|
||||||
#include "libcrypt.h"
|
#include "libcrypt.h"
|
||||||
|
|
||||||
char *crypt(const char *key, const char *salt)
|
char *crypt(const char *key, const char *salt)
|
||||||
@ -26,7 +27,7 @@ char *crypt(const char *key, const char *salt)
|
|||||||
return __sha512_crypt(ukey, usalt);
|
return __sha512_crypt(ukey, usalt);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* __set_errno(EINVAL);*/ /* ENOSYS might be misleading */
|
__set_errno(EINVAL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return __des_crypt(ukey, usalt);
|
return __des_crypt(ukey, usalt);
|
||||||
|
Reference in New Issue
Block a user