pushrax / node-rcon

A generic RCON protocol client for node.js
MIT License
133 stars 31 forks source link

Add ability to read rcon-packages across buffers #4

Closed fastrde closed 11 years ago

fastrde commented 11 years ago

Hello again,

when you to much traffic on the wire (for example: extensive logging enabled on server), it can happen that your buffer is too small. If you parse the rcon header of the last (possibly cut off) packet you can run in an buffer underflow.

The patch checks the bytes left in the buffer before reading the next rcon packet and when the number of bytes is too small it waits for the next buffer to concat.

lg

fastrde