emukidid / swiss-gc

Swiss - The swiss army knife of GameCube homebrew
GNU General Public License v2.0
1.23k stars 93 forks source link

dcp file: do not read more than MAX_PARAMS parameters #782

Closed tjanas closed 1 year ago

tjanas commented 1 year ago

If there are more than MAX_PARAMS (currently 16) pairs in a .dcp file, stop parsing after the first 16 to avoid a buffer overflow.

Extrems commented 1 year ago

This skips the values for the 16th pair.

tjanas commented 1 year ago

You are correct, it was aborting mid-way through parsing the 16th pair. I think now it should be fixed.

Extrems commented 1 year ago

Closed in favor of dynamic memory allocation.