Potential buffer overflow in SFXSetup/SfxSetup.cpp
A free file archiver for extremely high compression
Brought to you by:
ipavlov
Changes of v.26.00 on CPP\7zip\Bundles\SFXSetup\SfxSetup.cpp in function ReadDataString introduce potential BO on context variable buffer.
Memory copy function may overflow the destination buffer in certain circumstances (depending on "foreign" input read from inFile).
More details:
https://sonarcloud.io/project/issues?pullRequest=468&open=AZxo8WNdD7FB2mcciWZO&id=mcmilk_7-Zip-zstd
https://github.com/mcmilk/7-Zip-zstd/pull/468/changes/f4efd0f2d960b18fd51a894d04b5eadebf8c270b
Details:
https://github.com/mcmilk/7-Zip-zstd/pull/468#issuecomment-3947594135
The fix is correct.
Thanks for report!