ralstonba / Async-Speed-with-Websockets

0 stars 0 forks source link

Edge cases and array index bounding #6

Closed ralstonba closed 5 years ago

ralstonba commented 5 years ago

https://github.com/ralstonba/CS3750Assignment3/blob/150322b546d12884abb1cf8d79f2bf2456c0df43/src/main/java/com/example/speed/Controller/SpeedController.java#L106-L114

The bounds are not checked on this loop leaving us open to an index out of bounds exception, we can not trust the client to only send valid requests.

Also, we can not tell if a players claim of having a stale hand is valid without also checking to make sure they are unable to draw. I can think of the following cases to be considered:

Let me know if you come up with any more or would like me to help with this.

AaronNybo commented 5 years ago

Fixed.