diff options
author | Denys Vlasenko | 2022-01-05 23:02:13 +0100 |
---|---|---|
committer | Denys Vlasenko | 2022-01-05 23:03:54 +0100 |
commit | 6062c0d19bc201cbeb61b8875598cdd7a14a5ae0 (patch) | |
tree | 0dbe9b5d8b0f97c3a7e23d28d7a6a9735abfce42 /include | |
parent | db5546ca101846f18294a43b39883bc4ff53613a (diff) | |
download | busybox-6062c0d19bc201cbeb61b8875598cdd7a14a5ae0.zip busybox-6062c0d19bc201cbeb61b8875598cdd7a14a5ae0.tar.gz |
libbb: change xstrndup, xmemdup to take size_t as size parameter
Also, remove entirely usually-disabled paranoia check (was also using
wrong config option to enable itself).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index c93058f..daa3107 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -429,8 +429,8 @@ void *xrealloc(void *old, size_t size) FAST_FUNC; xrealloc_vector_helper((vector), (sizeof((vector)[0]) << 8) + (shift), (idx)) void* xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift, int idx) FAST_FUNC; char *xstrdup(const char *s) FAST_FUNC RETURNS_MALLOC; -char *xstrndup(const char *s, int n) FAST_FUNC RETURNS_MALLOC; -void *xmemdup(const void *s, int n) FAST_FUNC RETURNS_MALLOC; +char *xstrndup(const char *s, size_t n) FAST_FUNC RETURNS_MALLOC; +void *xmemdup(const void *s, size_t n) FAST_FUNC RETURNS_MALLOC; void *mmap_read(int fd, size_t size) FAST_FUNC; void *mmap_anon(size_t size) FAST_FUNC; void *xmmap_anon(size_t size) FAST_FUNC; |