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 Passed - Unit
No Test Coverage - Build Status
Buildable 10311 Build 10725: arc lint + arc unit
Event Timeline
libexec/rtld-elf/rtld.c | ||
---|---|---|
5317 | Compare the size of ld.so before and after your patch is applied. |
libexec/rtld-elf/rtld.c | ||
---|---|---|
5317 | 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.