mailing list of musl libc
 help / color / mirror / code / Atom feed
cd847980b042843079dc8f05b03c919ed8884bb6 blob 1081 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
46
47
48
49
50
51
 
#include <wchar.h>
#include <stdio.h>
#include <stdarg.h>
#include "atomic.h"

int __fwprintf_chk(FILE *restrict f, int flag, const wchar_t *restrict fmt, ...)
{
	int ret;
	va_list ap;
	va_start(ap, fmt);
	ret = vfwprintf(f, fmt, ap);
	va_end(ap);
	return ret;
}

int __swprintf_chk(wchar_t *restrict s, size_t n, int flag, size_t slen, const wchar_t *restrict fmt, ...)
{
	int ret;
	va_list ap;
	if (n > slen) a_crash();
	va_start(ap, fmt);
	ret = vswprintf(s, n, fmt, ap);
	va_end(ap);
	return ret;
}

int __wprintf_chk(int flag, const wchar_t *restrict fmt, ...)
{
	int ret;
	va_list ap;
	va_start(ap, fmt);
	ret = vfwprintf(stdout, fmt, ap);
	va_end(ap);
	return ret;
}

int __vfwprintf_chk(FILE *f, int flag, const wchar_t *restrict fmt, va_list ap)
{
	return vfwprintf(f, fmt, ap);
}

int __vswprintf_chk(wchar_t *restrict s, size_t n, int flag, size_t slen, const wchar_t *restrict fmt, va_list ap)
{
	if (n > slen) a_crash();
	return vswprintf(s, n, fmt, ap);
}

int __vwprintf_chk(int flag, const wchar_t *restrict fmt, va_list ap)
{
	return vfwprintf(stdout, fmt, ap);
}
debug log:

solving cd84798 ...
found cd84798 in https://inbox.vuxu.org/musl/1434509291-28997-1-git-send-email-josiahw@gmail.com/

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

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

index at:
100644 cd847980b042843079dc8f05b03c919ed8884bb6	src/compat/wprintf_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).