2
0
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:
Jarrod Johnson 2020-11-06 13:57:35 -05:00
parent 31c2c5f6f7
commit 1ecef6f251

View File

@ -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);