| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2024-10-10 | Fix a crash in strncpy/stpncpystrn | jvoisin | |
| ``` 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 ``` > I think strncpy logic is broken: `__fh_size_t max_len_s = strlen(__s);` may try read past `size_t __n`. > Create a buf without any trailing `\0`, do `strncpy(dest, buf, sizeof(buf));`, it should work, since `strncpy` will stop at `sizeof buf` > but the current fority-headers implementation will do `strlen(buf)`, which will go boom when it is not terminated with \0 Reported-by: ncopa | |||
| 2023-12-28 | Re-enable previously disabled overlap checks | jvoisin | |
| They were previously disabled in 80a83a5 | |||
| 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-06-14 | Add tests for strncpy and handle overlapping buffers there | jvoisin | |
