mailing list of musl libc
 help / color / mirror / code / Atom feed
fd5b075fc4f7ba24e4aa2af4760d2041efda37f4 blob 1241 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
#include <wchar.h>
#include <stdlib.h>
#include "atomic.h"

size_t __mbsnrtowcs_chk(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st, size_t wcslen)
{
	if (wn > wcslen) a_crash();
	return mbsnrtowcs(wcs, src, n, wn, st);
}

size_t __mbsrtowcs_chk(wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st, size_t wslen)
{
	if (wn > wslen) a_crash();
	return mbsrtowcs(ws, src, wn, st);
}

size_t __mbstowcs_chk(wchar_t *restrict ws, const char *restrict s, size_t wn, size_t wslen)
{
	if (wn > wslen) a_crash();
	return mbstowcs(ws, s, wn);
}

size_t __wcrtomb_chk(char *restrict s, wchar_t wc, mbstate_t *restrict st, size_t slen)
{
	if (slen < MB_CUR_MAX) a_crash();
	return wcrtomb(s, wc, st);
}

size_t __wcsnrtombs_chk(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st, size_t dstlen)
{
	if (n > dstlen) a_crash();
	return wcsnrtombs(dst, wcs, wn, n, st);
}

size_t __wcstombs_chk(char *restrict s, const wchar_t *restrict ws, size_t n, size_t slen)
{
	if (n > slen) a_crash();
	return wcstombs(s, ws, n);
}

int __wctomb_chk(char *s, wchar_t wc, size_t slen)
{
	if (slen < MB_CUR_MAX) a_crash();
	return wctomb(s, wc);
}
debug log:

solving fd5b075 ...
found fd5b075 in https://inbox.vuxu.org/musl/20150831011011.GA2232@newbook/ ||
	https://inbox.vuxu.org/musl/20150701142106.GA1829@newbook/
found 66e35b1 in https://inbox.vuxu.org/musl/1434509291-28997-1-git-send-email-josiahw@gmail.com/

applying [1/3] https://inbox.vuxu.org/musl/1434509291-28997-1-git-send-email-josiahw@gmail.com/
diff --git a/src/compat/wchar_chk.c b/src/compat/wchar_chk.c
new file mode 100644
index 0000000..66e35b1


applying [2/3] https://inbox.vuxu.org/musl/20150831011011.GA2232@newbook/
diff --git a/src/compat/wchar_chk.c b/src/compat/wchar_chk.c
index 66e35b1..fd5b075 100644

Checking patch src/compat/wchar_chk.c...
Applied patch src/compat/wchar_chk.c cleanly.
Checking patch src/compat/wchar_chk.c...
Applied patch src/compat/wchar_chk.c cleanly.

skipping https://inbox.vuxu.org/musl/20150701142106.GA1829@newbook/ for fd5b075
index at:
100644 fd5b075fc4f7ba24e4aa2af4760d2041efda37f4	src/compat/wchar_chk.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).