Sygmei / 11Zip

Dead simple zipping / unzipping C++ Lib
MIT License
92 stars 22 forks source link

Fix container overflow #25

Closed blawrence-ont closed 1 year ago

blawrence-ont commented 1 year ago

Hi,

0f26d58e75a8c563cc643aaa664c6c242235e75f was picked up by our sanitized builds due to writes outside of the bounds of a container. While fixing that it was also spotted that f332fd55134d9d0b9e4d1a3e97f61cf0aef3df99 could occur with corrupt data, though this was only an observation and no attempt was made to try and trigger the issue.

Note that while I can see logic in the CMakeLists.txt to support pre-C++17, unzipper.cpp uses std::string_view which wasn't added until C++17, in which case c767b9b375b9e9127c44a0f657f2105b71ff9d61 should be OK to use too. If it's not then I can drop that commit since it's not fixing anything.

Sygmei commented 1 year ago

Good catch, I'll bump CMakeLists.txt to use C++17 !

Sygmei commented 1 year ago

Thanks for your contribution, LGTM :)