H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 81 forks source link

Fix buffer overread and incorrect termination of server status message #1306

Closed dgelessus closed 1 year ago

dgelessus commented 1 year ago

The previous code incorrectly assumed that the buffer from curl is a zero-terminated string.

This issue was almost never noticeable, because I guess in practice both buffers start out zero-initialized. One case where it was noticeable: when the server dynamically changes the status message to a shorter message, the client displayed garbage characters from the previous (longer) message at the end.