Repository navigation
bugfix(worldheightmap): Reject map sizes that overflow the cell array allocations - #3486
tintinhamans wants to merge 1 commit into
Conversation
WalkthroughHeight map parsing now validates dimensions, border sizes, and declared data sizes in both full-data and size-only paths. Invalid values produce ChangesHeight map validation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: 🟡 Moderate · up to
|
c383ea9 to
a5bae28
Compare
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7d66925a-87e4-4a90-b43f-92d527b561ae
📒 Files selected for processing (1)
Core/GameEngineDevice/Source/W3DDevice/GameClient/WorldHeightMap.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
a5bae28 to
a8ee0e9
Compare
a8ee0e9 to
6d6fdf8
Compare
|
Although world builder breaks at the moment when going beyond 1200x1200 due to memory limits, you might want to make sure world builder also adheres to the maximum world dimensions. |
I'll cap WorldBuilder at the same limit in a follow-up and look at the memory issue. |
6d6fdf8 to
8974823
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3665e2f8-4cc3-461f-a1fd-0ddb7ef65fd3
📒 Files selected for processing (2)
Core/GameEngine/Include/Common/MapReaderWriterInfo.hCore/GameEngineDevice/Source/W3DDevice/GameClient/WorldHeightMap.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| #define K_WORLDDICT_VERSION_1 1 | ||
| #define K_MAPPREVIEW_VERSION_1 1 | ||
|
|
||
| // TheSuperHackers @bugfix arcticdolphin 12/10/2026 Map size limits, the area bounds the per cell allocations. |
There was a problem hiding this comment.
It might be helpful to also include the reason for the limit, related to the vertex and index buffers being 16bit etc. Otherwise it just looks arbitrary
ParseHeightMapDatatakes width and height straight from the map file and only checks the data size againstm_width*m_height. That product wraps in 32 bits, so absurd dimensions pass andPathfindLayer,PartitionManagerandW3DShroudallocate the wrapped count while indexing with the real one.Both height map parsers now reject an area above 4096x4096, a side above 8192 or a border that does not fit, before allocating. The side limit keeps the shroud texture and the 16 bit shoreline coordinates in range. The largest of the 446 retail and custom maps I tested is 800.