Repository navigation
bugfix(worldheightmap): Reject map sizes that overflow the cell array allocations - #3486
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
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: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · 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.
8974823 to
1456efb
Compare
1456efb to
96bdbe0
Compare
96bdbe0 to
db81624
Compare
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.