From 6062c0d19bc201cbeb61b8875598cdd7a14a5ae0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 5 Jan 2022 23:02:13 +0100 Subject: 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 --- include/libbb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/libbb.h') 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; -- cgit v1.1