mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
more bounds checks in network_receive_save_remove_flag (#25)
This commit is contained in:
parent
0174cfa0fa
commit
933f0812a7
1 changed files with 2 additions and 2 deletions
|
@ -29,12 +29,12 @@ void network_receive_save_remove_flag(struct Packet* p) {
|
|||
packet_read(p, &flagsToRemove, sizeof(u32));
|
||||
packet_read(p, &backupSlot, sizeof(u8));
|
||||
|
||||
if (fileIndex >= NUM_SAVE_FILES) {
|
||||
if (fileIndex < 0 || fileIndex >= NUM_SAVE_FILES) {
|
||||
LOG_ERROR("Invalid fileIndex: %d", fileIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (courseIndex >= COURSE_COUNT) {
|
||||
if (courseIndex < -1 || courseIndex >= COURSE_COUNT) {
|
||||
LOG_ERROR("Invalid courseIndex: %d", courseIndex);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue