From c22e01c9e91864bad0210bfc90ba4952e91dba2a Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 12 Jun 2024 01:15:03 +0200 Subject: Mark bufalloc with __attribute__((alloc_size)) --- src/alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/alloc.h b/src/alloc.h index 301971c..80e2384 100644 --- a/src/alloc.h +++ b/src/alloc.h @@ -8,6 +8,6 @@ /* Allocate a buffer of NMEMB elements of size SIZE. If PTR is non-null then reallocate the buffer it points to. Aborts on out-of-memory or overflow. */ void *bufalloc(void *ptr, size_t nmemb, size_t size) - __attribute__((returns_nonnull)); + __attribute__((returns_nonnull, alloc_size(2, 3))); #endif /* !ORYX_ALLOC_H */ -- cgit v1.2.3