<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fortify-headers/tests/test_stpncpy_dynamic_write.c, branch strn</title>
<subtitle>Standalone portable header-based implementation of FORTIFY_SOURCE=3 
</subtitle>
<id>http://git.dustri.org/fortify-headers/atom?h=strn</id>
<link rel='self' href='http://git.dustri.org/fortify-headers/atom?h=strn'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/'/>
<updated>2024-10-10T13:50:40Z</updated>
<entry>
<title>Fix a crash in strncpy/stpncpy</title>
<updated>2024-10-10T13:50:40Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-10-10T13:50:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=e2cfd2879a15db00dfa9a42eeb1baaef6a930aff'/>
<id>urn:sha1:e2cfd2879a15db00dfa9a42eeb1baaef6a930aff</id>
<content type='text'>
```
Core was generated by `scripts/mod/modpost -M -m -o Module.symvers -n -T modules.order vmlinux.o'.
Program terminated with signal SIGSEGV, Segmentation fault.
warning: 17     src/string/strlen.c: No such file or directory
(gdb) bt
```

&gt; I think strncpy logic is broken: `__fh_size_t max_len_s = strlen(__s);` may try read past `size_t __n`.
&gt; Create a buf without any trailing `\0`, do `strncpy(dest, buf, sizeof(buf));`, it should work, since `strncpy` will stop at `sizeof buf`
&gt; but the current fority-headers implementation will do `strlen(buf)`, which will go boom when it is not terminated with \0

Reported-by: ncopa
</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>Add more dynamic tests</title>
<updated>2023-09-17T14:02:08Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-09-17T14:02:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=267d5dbe4f79b8ebff8588700b2a8c0d1e56fc97'/>
<id>urn:sha1:267d5dbe4f79b8ebff8588700b2a8c0d1e56fc97</id>
<content type='text'>
</content>
</entry>
</feed>
