perform size checks on various operations

Signed-off-by: Tavi <tavi@divested.dev>
Co-authored-by: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
This commit is contained in:
Tavi 2025-03-22 02:54:10 -04:00
parent 7481c8857f
commit 2f06cddeb7
No known key found for this signature in database
GPG key ID: E599F62ECBAEAF2E
46 changed files with 1166 additions and 13 deletions

12
wmemset.c Normal file
View file

@ -0,0 +1,12 @@
#include "musl.h"
/* Copied from musl libc version 1.2.5 licensed under the MIT license */
#include <wchar.h>
wchar_t *musl_wmemset(wchar_t *d, wchar_t c, size_t n)
{
wchar_t *ret = d;
while (n--) *d++ = c;
return ret;
}