| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2024-05-26 | Add vasprintf/asprintf2.3 | jvoisin | |
| The only hardening being done here is to set the char** parameter to thos functions to NULL in case of an error, to prevent it from being used should people forget to check return values. This is already done on some BSD, as well as in Rocky Linux. | |||
| 2024-04-24 | Fix some overlap mismatch | jvoisin | |
| This was caught by the following test: ``` int main(void) { char c[32]; memcpy(c, c + 16, 16); } ``` Reported-by: q66 | |||
| 2024-04-24 | Disable pedantic checks by default | jvoisin | |
| They can be re-enabled via `PEDANTIC_CHECKS` | |||
| 2024-03-19 | Relax our checks for memchr on C11 and above2.2 | jvoisin | |
| Since C11: > This function behaves as if it reads the bytes sequentially and stops as soon as a matching bytes is found: if the array pointed to by ptr is smaller than count, but the match is found within the array, the behavior is well-defined. Reported-by: q66 | |||
| 2024-03-08 | Add some NULL-pointers checks | jvoisin | |
| See: - https://www.imperialviolet.org/2016/06/26/nonnull.html - https://davidben.net/2024/01/15/empty-slices.html | |||
| 2024-01-13 | Properly check for builtins | jvoisin | |
| Clang's [documentation](https://clang.llvm.org/docs/LanguageExtensions.html#has-builtin) says: > __has_builtin should not be used to detect support for a builtin macro; use #ifdef instead. So we're now using both, since it's often tedious/non-trivial to find out what is a macro and what is a compiler builtin, across compilers and C versions. | |||
| 2023-12-28 | Re-enable previously disabled overlap checks | jvoisin | |
| They were previously disabled in 80a83a5 | |||
| 2023-12-27 | Improve __fh_overlap implementation | jvoisin | |
| 2023-12-27 | Don't check for overlapping in strncpy/stpncpy for now | jvoisin | |
| They check overlap across the whole range of the given length, but the given length is not what will actually be copied, rather it's the maximum length (if src is shorter, only length of src will be copied). This triggers false positives and traps where it shouldn't (e.g. in ICU tests). Reported-by: q66 | |||
| 2023-12-18 | fix typo for __builtin_memcpy | psykose | |
| 2023-12-16 | Disable str(r)chr hardening | q66 | |
| It's UB to subtract null pointers, which these potentially may be. It also makes python test suite fail. | |||
| 2023-12-15 | Rename some macros to be more namespace-friendly | q66 | |
| 2023-12-15 | Fix missing } for extern "C" when using clang | q66 | |
| 2023-12-15 | Move wctomb to stdlib.h and disable it for now | q66 | |
| 2023-12-15 | Guard some conditional stdio APIs with the right macros | q66 | |
| Fixes https://github.com/jvoisin/fortify-headers/issues/34 | |||
| 2023-12-15 | Do not use static inline for C++ to avoid ODR violations | q66 | |
| Fixes https://github.com/jvoisin/fortify-headers/issues/31 | |||
| 2023-12-15 | Add missing include in select.h | q66 | |
| 2023-12-15 | Remove superfluous includes | jvoisin | |
| This should fix #32 | |||
| 2023-12-07 | Add qsort | jvoisin | |
| 2023-12-07 | Add a global test to ensure that all headers are compiling | jvoisin | |
| 2023-12-06 | Work around an erroneous `-Wformat-nonliteral` bug in gcc | jvoisin | |
| See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110834 Reported-by: ksperling-apple | |||
| 2023-11-16 | Add hardening for select() | jvoisin | |
| This is unlikely to be used, since fd_set is usually manipulated by macros, but it doesn't hurt to add a simple comparison. | |||
| 2023-11-01 | Add support for FD_ISSET | jvoisin | |
| 2023-10-16 | Add a check about redefined macros | jvoisin | |
| 2023-10-01 | Add vfprintf` | jvoisin | |
| 2023-10-01 | Add `fprintf` | jvoisin | |
| 2023-09-30 | Add `vprintf` | jvoisin | |
| 2023-09-30 | Fix a typo | jvoisin | |
| 2023-09-30 | Add `strlen` | jvoisin | |
| 2023-09-29 | Make use of the native _chk variants for real | jvoisin | |
| 2023-09-28 | Add `printf` hardening | jvoisin | |
| 2023-09-27 | Add support for more builtin compiler provided _chk variants | jvoisin | |
| 2023-09-27 | Add an option to make use of compiler-provided _chk builtins | jvoisin | |
| 2023-09-22 | Add more __diagnose_as_builtin annotations | jvoisin | |
| 2023-09-21 | Properly enable diagnose_as_builtin attribute | jvoisin | |
| 2023-09-20 | Add tests for compile-time errors | jvoisin | |
| 2023-09-20 | Replace a strlen+condition with strnlen | jvoisin | |
| 2023-09-11 | Factorize overlap checks into a macro | jvoisin | |
| 2023-09-11 | Add a warning for _FORTIFY_SOURCE>3 | jvoisin | |
| 2023-09-11 | Add a warning if realpath is called with path set to NULL | jvoisin | |
| 2023-09-11 | Add the warn_unused_result attribute to alloc-related functions | jvoisin | |
| 2023-08-22 | Clean up some includes | jvoisin | |
| - Remove a superfluous `#if defined(__has_builtin)` since it's already accounted for in include/fortify-headers.h - Replace `_FORTIFY_FD_POS0` with the already existing `_FORTIFY_POS0` - Factorise some duplicate code into a macro | |||
| 2023-08-22 | Increase portability | jvoisin | |
| If the compiler doesn't know about `__builtin_trap`, use `abort` instead. | |||
| 2023-08-22 | Add hardening for pwrite | jvoisin | |
| 2023-08-21 | Harden umask | jvoisin | |
| 2023-08-21 | Make use of __diagnose_if | jvoisin | |
| 2023-08-21 | Remove some todo in __bmo's implementation | jvoisin | |
| 2023-08-21 | Add tests for fgetws and mbsrtowcs | jvoisin | |
| 2023-08-20 | Add more __access annotations in stdio.h | jvoisin | |
| 2023-08-20 | Add two __format annotations | jvoisin | |
