forked from ddnet/ddnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when loading very long localization lines
The client previously crashed when loading a localization file with a replacement line (plus zero terminator) longer than the size of a `CHeap` chunk (65600 bytes) due to the line data being written outside the heap chunk. This is fixed by allowing `CHeap` to allocate chunks as large as necessary to contain at least one item. As an alternative the `CHeap` functions could be changed to return `nullptr` if the wanted allocation is too large, which would have to be handled explicitly when loading localization files.
- Loading branch information
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters