In open_binary_fd: when using buffer size for strl* and snprintf,
always use >= instead of > to avoid truncation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
libexec/rtld-elf/rtld.c | ||
---|---|---|
5309 ↗ | (On Diff #30393) | Compare the size of ld.so before and after your patch is applied. |
libexec/rtld-elf/rtld.c | ||
---|---|---|
5309 ↗ | (On Diff #30393) | I haven't considered it (and thanks for pointing out). I'll update this one to a smaller scope. |
Comment Actions
In open_binary_fd: when using buffer size for strl* and snprintf,
always use >= instead of > to avoid truncation.
Comment Actions
The issue with stdio in rtld is not limited to the bloat. Locale stuff that gets pulled in causes runtime breakage for rtld. One of the reason is that it uses TLS.
Overall, rtld is not a C hosted environment, which is obvious in hindsight.