jhalter / mobius

A Hotline server implemented in Golang for macOS, Linux, and Windows operating systems
MIT License
73 stars 8 forks source link

Fix overwrite of user info due to buffer re-use #76

Closed jhalter closed 1 year ago

jhalter commented 1 year ago

This fixes issue that was causing the memory containing the client login info to be overwritten with chunks of chat message data. This was happening because scanner.Bytes() returns a byte slice that is re-used for subsequent writes, so we need to make a copy of the data.

Fixes #75