-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
ChangeLog
149 lines (139 loc) · 7.79 KB
/
ChangeLog
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
ChangeLog file for safeclib
Changes in v09102017 3.1.0
Summary: With a non-C11 compiler not on windows the API didn't change, only docs.
- Fixed man pages: show public headers, hide private headers.
- Removed html pages from the release tarball
- Fixed slen=0 behaviour with cpy functions: When the library is compiled
with a C11 compiler, slen=0 is permitted, with an older compiler keep
erroring with ESZEROL: strncpy_s, wcsncpy_s, wcslwr_s, wcsupr_s, strcpyfld_s,
strcpyfldin_s, strcpyfldout_s
- Fixed docs for this behaviour: wcsncat_s, strncat_s
- Added hardened WARN_CFLAGS and WARN_LDFLAGS, minor fixes for the
hardened flags on older compilers,
probe for -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
- Fixed NFD canon table for windows (sizeof wchar_t == 2) for 9 expansions
of length 6: U+1D160 - U+1D1C0
- Fixed _dec_w16 and _ENC_W16 encoding on windows, convert from and to
surrogate pair.
- Fixed distcheck and release targets, added distcheck to travis
Changes in v04102017 3.0.0
- Added mingw cross-compilation support and changes.
The MINGW_HAS_SECURE_API deviates in strtok_s, vsnprintf_s, wcstok_s
from C11 in w64, and in vswprintf for w32. (!__STRICT_ANSI__).
Add EXPORT and EXTERN decls for dllexport/dllimport.
Cleanup the src headers.
- Added -D_FORTIFY_SOURCE=2
- Made it -Wall -Wextra -Werror -pedantic safe
- Added cygwin and freebsd support
- Install bin/check_for_unsafe_apis. Renamed and improved: 7x faster,
added missing conversion hints. also install its man1.
- Seperated internal libstdunsafe target, for std but unsafe C11
functions: snprintf_s, vsnprintf_s, snwprintf_s, vsnwprintf_s, tmpnam_s
- Added --enable-unsafe (the 5 funcs above are not included by default).
defines SAFECLIB_ENABLE_UNSAFE
- Added --disable-extensions, skipping all non-C11 safe functions.
This contains in summary only 13 functions for now:
memcpy_s, memmove_s, memset_s, sprintf_s, strcat_s, strcpy_s, strncat_s,
strncpy_s, strnlen_s, strtok_s, vsprintf_s, strerror_s, strerrorlen_s
plus all the new C11 functions.
defines SAFECLIB_DISABLE_EXTENSIONS
- Rearranged src layout
- Macrofied many more tests, add CHECK_SLACK, errnot_t return and ERRNO checks.
- Improved some tests for old gcc -ansi (c89) memcmp
- Add unlikely() to improve branch prediction
- Added --enable-gcov and a gcov target. lcov support not yet,
but via gcov2perl and some fixups essentially the same. See build-tools/smoke.sh
- Added a check-valgrind make target with support for BSD make
- Added all missing safe wchar and multibyte string C11 functions:
mbsrtowcs_s, mbstowcs_s, wcsrtombs_s, wcstombs_s, wcrtomb_s,
wctomb_s, wcsnlen_s, wcscpy_s, wcsncpy_s, wcscat_s, wcsncat_s,
wcstok_s, swprintf_s, vswprintf_s, wmemcpy_s, wmemmove_s,
wprintf_s, fwprintf_s, vfwprintf_s, vwprintf_s, vswscanf_s, swscanf_s,
wscanf_s, vwscanf_s, vfwscanf_s, fwscanf_s
- Added RSIZE_MAX_WMEM and RSIZE_MAX_WSTR limits,
wchar_t maybe 2 or 4 bytes.
- Added all missing safe C11 IO functions:
sscanf_s, scanf_s, fscanf_s, vsscanf_s, vscanf_s, vfscanf_s,
fprintf_s, printf_s, vfprintf_s, vprintf_s, tmpnam_s (unsafe),
tmpfile_s, gets_s.
- Added all missing safe C11 time and stdlib functions:
asctime_s, ctime_s, gmtime_s, localtime_s, getenv_s,
bsearch_s, qsort_s.
- Added --disable-wchar to disable the new multibyte and wchar functions,
but not the old 16/32 memory functions.
defines SAFECLIB_DISABLE_WCHAR
- Better debugging support: add .i target
- Fixed memset32_s for n > RSIZE_MAX_MEM32 ESLEMAX,
was only RSIZE_MAX_MEM16.
- Added the wcsfc_s, wcsnorm_s, wcsicmp_s extensions to be able to compare wide
strings.
- Added --enable-norm-compat to enable the big compatbility modes NFKD, NFKC
for wcsnorm_s.
- Added the timingsafe_bcmp and timingsafe_memcmp extensions from OpenBSD,
and memccpy_s derived from FreeBSD.
- Changed strtok_s to set errno to ES* values. C11 does nothing,
but with wcstok_s sets errno to EINVAL.
- Changed memset_s, harmonized with C11 API
- Changed mem{cpy,move,set}_s with smax/n=0, dependent if compiled with
a C11 compiler or not.
- Added a C11 compiler probe from latest autoconf git.
- Eliminated str/mem/lib inclusion loops. You need to include the right header(s).
- Clarify return values for {str,wcs}tok_s
- Negative return error values for all printf functions,
Make clear that errno is not set with _s violations, only the underlying
system call sets it. (EINVAL, EOVERFLOW, EILSEQ, EOF)
- Updated from autoconf 2.68 to 2.69
Changes in v30082017 2.1.1
- Added vsprintf_s, vsnprintf_s. They are C11.
- Fixed travis smoking with different compilers.
- Fixed test with wrong -fsanitize=address strcmp() results.
asan returns just sgn(strcmp()), not the position.
- Macrofied some tests, use probed stdlib defines for fallbacks,
and add missing headers.
- Added empty stubs for all missing safe C11 functions
- Fixed C++ support for sprintf* and bool. Resolve restrict from
config.h before the header declarations.
Changes in v25082017 2.1.0
- Fixed many tests. They were not enabled at all. See #10.
sprintf_s, snprintf_s, memcpy16_s, memcpy32_s,
memmove_s, memmove16_s, memmove32_s, memset_s,
strcpyfldout_s, strljustify_s,
- Changed some errors: Throw ESLEMAX when smax exceeds max,
before the smax>dmax check (ESNOSPC):
memcpy_s, memcpy16_s, memcpy32_s, memcmp_s, memcmp16_s,
memcmp32_s, memmove_s, memmove16_s, memmov32_s.
- Reverted a strljustify_s change by me.
- Document that memset_s on C11 allows n = ZERO, and
ESNULLP will be EINVAL
- --enable-debug on Darwin disables shared
- add snprintf_s, which is the unsafe variant of sprintf_s
Changes in v24082017 2.0.1
- Added man (3) pages and proper documentation.
See https://rurban.github.io/safeclib/
- Added a safe_config.h for some new configure options:
strmax, memmax, nullstack and STRTOK_DELIM_MAX_LEN
Changes in v15082017 2.0.0
- Add restrict to all pointer args, where applicable
- Change ESLEMAX to ESNOSPC for `(smax > dmax)` overflows
- Made it -Wall -pedantic safe
- Fix strljustify_s for empty src
- Fix various test errors: wrong printf format types, mostly on 64bit.
uninitialized variables, wrong variable types, wrong variables.
- test_strcspn_s.c: fix for g++
- Fixup sprintf_s: Use the established API, call the str_constraint_handler,
return the proper error values. Add tests.
- Add guards to prevent name mangleing when headers are used in c++ code.
- change memset_s to __STDC_WANT_LIB_EXT1__
- memset16_s, memset32_s: change API analog to memset_s.
Also add the smax C11 argument there, to be consistent.
smax denotes the max. number of bytes, the max size.
- add missing AM_PROG_AR to configure.ac
Changes in v10052013 1.0.0
- Autogenerate safe_lib_errno.h safe_types.h
- use C99 stdbool instead of boolean_t, replace TRUE/FALSE with true/false
Changes in v04122012 1.0.0
- Update documentation
- Support slkm: linux kernel module
Changes in v08112011 0.0
- autotoolized
- taken from http://sourceforge.net/projects/safeclib/