mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 12:41:39 +00:00
Be a bit paranoid about string boundary
This commit is contained in:
parent
31c2c5f6f7
commit
1ecef6f251
@ -122,6 +122,7 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
if (currlen) {
|
||||
ret = read(sock, buffer, currlen); // Max is 1000, well under MAX_PACKET
|
||||
buffer[currlen] = 0;
|
||||
}
|
||||
if (currtype == 2) {
|
||||
dprintf(sock, "\x03%c", currlen);
|
||||
|
Loading…
Reference in New Issue
Block a user