bareos: master b2a582ad
Author | Committer | Branch | Timestamp | Parent | |
---|---|---|---|---|---|
Sebastian Sura | Sebastian Sura | master | 2025-02-05 13:36 | master 1aea51f4 | Pending |
Changeset | compat: fix out of bounds write We allocated too little memory to hold the information we wanted to have. We reserved 544 bytes total, which left 524 bytes for the PathBuffer. This buffer contains two paths: The print name and the substitute name. Each can (probably) contain up to 260*2 bytes, e.g. 1040 bytes total. This means that the function would fail for very long strings and would crash for certain strings as we try to write to one-past the path (which would be ok if we made sure to allocate enough space!) On our cd/ci infrastructure, we hit exactly that issue: The PathBuffer used up _exactly_ all bytes given, leading to the crash! |
||||
mod - core/src/win32/compat/compat.cc | Diff File |