Repository navigation
fix: address decoder memory leaks, ELF parser safety, and python tool… - #615
premkumar0184 wants to merge 1 commit into
Conversation
… bugs - Decoders (JPEG/PNG): Wrap stbi_uc raw pointers in std::unique_ptr RAII guards to prevent memory leaks on allocation failure. Lower PNG MAX_DIMENSION from 2.1B to 16384 and enforce dimension checks in Decode/ParseHeader paths to protect against image bomb DoS attacks. - Relinker: Add bounds checking on source ELF buffer in LinuxElfPatcher before reading offsets. Replace strict-aliasing-violating reinterpret_cast with std::memcpy. Use std::tolower and std::memcpy in main.cpp. - Tools: Fix pr_overlap.py pathspec to 'core/libs/prx/**/*.cpp' so PR export collisions are detected in subdirectories. Add safety checks for deleted GitHub accounts and empty git output in pr_overlap.py. Allow WINLIBS_BIN environment variable override in package_release.py. Guard zero division in progress.py.
|
Thanks for looking through these, and welcome. I read it file by file. Some of it is useful, but it can't go in as one PR, and one change breaks the PR overlap check. Details below. One topic per PR. CONTRIBUTING asks for one topic per PR, and this one has seven unrelated changes: the JPEG and PNG decoders, the Linux ELF patcher,
The PNG JPEG dimension checks. A JPEG header stores width and height in 16 bits, and the file already has
So my suggestion: drop the |
|
Thanks again for going through these. I'm closing this one. It bundles seven unrelated changes, and one of them ( Two parts are worth having on their own:
If you decide to continue, please open each as its own PR with the template filled in. You can also reopen this one if you'd rather split it from here. |
… bugs
What
Tested
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)