OpenFusionProject / OpenFusion

Open source server for the FusionFall client
MIT License
351 stars 64 forks source link

Rank Calculation Out-of-Bounds Fix #268

Closed FinnHornhoover closed 11 months ago

FinnHornhoover commented 11 months ago

In PR #257 and the related tabledata PR https://github.com/OpenFusionProject/tabledata/pull/19, rank scores were replaced, but the old scores always had a value of 0 at the last rank. This had the effect of a null terminator and rank calculation never went out of bounds. When this pattern was broken, 0 star races were able to crash the server.

There's now an explicit bounds check that prevents this.