This change adds explicit buffer bounds checks to functions that write strings into buffers, replacing unsafe operations such as strcpy with safer alternatives using size checks and std::copy. It also ensures section and segment names do not overflow their target fields and adds error handling for negative offsets. These changes address potential buffer overflow vulnerabilities and make the code robust against out-of-bounds memory access.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
This isn't the right place to submit changes to llvm. This copy of llvm is imported from https://github.com/llvm/llvm-project and changes should be proposed there.