MolecularMatters / raw_pdb

A C++11 library for reading Microsoft Program DataBase PDB files
BSD 2-Clause "Simplified" License
675 stars 91 forks source link

Fixed out of bounds read when looping over InlineeSourceLines #57

Closed tderoos closed 1 year ago

tderoos commented 1 year ago

The section size already includes the size of InlineeSourceLineHeader, but when processing section S_INLINEELINES both were added to the offset. This caused headerEnd to be beyond the end of the section, resulting in an out of bounds read and corrupt data.

When processing normal lines (section S_LINES), headerEnd is calculated correctly.

MolecularMatters commented 1 year ago

Thanks for the fix!