<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fortify-headers/include, branch 2.3</title>
<subtitle>Standalone portable header-based implementation of FORTIFY_SOURCE=3 
</subtitle>
<id>http://git.dustri.org/fortify-headers/atom?h=2.3</id>
<link rel='self' href='http://git.dustri.org/fortify-headers/atom?h=2.3'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/'/>
<updated>2024-05-26T20:19:27Z</updated>
<entry>
<title>Add vasprintf/asprintf</title>
<updated>2024-05-26T20:19:27Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-05-20T12:48:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=1becad43298e74ba73bc66f9d44523e5d121c667'/>
<id>urn:sha1:1becad43298e74ba73bc66f9d44523e5d121c667</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fix some overlap mismatch</title>
<updated>2024-04-24T15:14:46Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-04-24T15:09:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=a817e1555a755224cacc1cbdeeaefb6a1de606f0'/>
<id>urn:sha1:a817e1555a755224cacc1cbdeeaefb6a1de606f0</id>
<content type='text'>
This was caught by the following test:

```

int main(void) {
    char c[32];
    memcpy(c, c + 16, 16);
}
```

Reported-by: q66
</content>
</entry>
<entry>
<title>Disable pedantic checks by default</title>
<updated>2024-04-24T12:51:19Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-04-24T12:49:52Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=265fa03fa0c467c9c41d803ebe2a538e758cba20'/>
<id>urn:sha1:265fa03fa0c467c9c41d803ebe2a538e758cba20</id>
<content type='text'>
They can be re-enabled via `PEDANTIC_CHECKS`
</content>
</entry>
<entry>
<title>Relax our checks for memchr on C11 and above</title>
<updated>2024-03-19T17:35:13Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-03-19T17:35:13Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8ed72e7c1caa0eb4238e649063c26a11720935de'/>
<id>urn:sha1:8ed72e7c1caa0eb4238e649063c26a11720935de</id>
<content type='text'>
Since C11:

&gt; 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
</content>
</entry>
<entry>
<title>Add some NULL-pointers checks</title>
<updated>2024-03-08T15:28:52Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-03-08T15:07:57Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=140cffbe84a08669d67c3257258d2bb70ff29c3b'/>
<id>urn:sha1:140cffbe84a08669d67c3257258d2bb70ff29c3b</id>
<content type='text'>
See:
- https://www.imperialviolet.org/2016/06/26/nonnull.html
- https://davidben.net/2024/01/15/empty-slices.html
</content>
</entry>
<entry>
<title>Properly check for builtins</title>
<updated>2024-01-13T19:34:19Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-01-13T19:34:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=1a8431430ec4b97f0baaf2bf3b385be5f5da08cf'/>
<id>urn:sha1:1a8431430ec4b97f0baaf2bf3b385be5f5da08cf</id>
<content type='text'>
Clang's [documentation](https://clang.llvm.org/docs/LanguageExtensions.html#has-builtin) says:

 &gt; __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.
</content>
</entry>
<entry>
<title>Re-enable previously disabled overlap checks</title>
<updated>2023-12-28T15:13:37Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-12-27T16:07:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=22a8094b41b2606084dc0c0c70487e5ed0fcb652'/>
<id>urn:sha1:22a8094b41b2606084dc0c0c70487e5ed0fcb652</id>
<content type='text'>
They were previously disabled in 80a83a5
</content>
</entry>
<entry>
<title>Improve __fh_overlap implementation</title>
<updated>2023-12-27T15:17:55Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-12-27T15:17:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8513fddefca4c6e3982718732afeec71bad4e688'/>
<id>urn:sha1:8513fddefca4c6e3982718732afeec71bad4e688</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't check for overlapping in strncpy/stpncpy for now</title>
<updated>2023-12-27T15:06:59Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-12-27T11:36:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=80a83a56b52e833e6d3afec4d0723d7625d52cee'/>
<id>urn:sha1:80a83a56b52e833e6d3afec4d0723d7625d52cee</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>fix typo for __builtin_memcpy</title>
<updated>2023-12-18T11:52:12Z</updated>
<author>
<name>psykose</name>
</author>
<published>2023-12-18T11:47:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=01dc0e38a8a0be034bf21cc6ae4cc8cebc0e7a79'/>
<id>urn:sha1:01dc0e38a8a0be034bf21cc6ae4cc8cebc0e7a79</id>
<content type='text'>
</content>
</entry>
</feed>
