X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;fp=src%2Fprotocol.c;h=3c9668314cbbcd3b73c1e9dc755eb3ca1eb672a0;hp=eadca13fc3790a3ddd41750f5c864cf0bce596db;hb=985d19caf20058db3c764f0f6fbeafa8bcc59fcc;hpb=d178b583df9fe2bf3ebb3a7377203efc5c46df32 diff --git a/src/protocol.c b/src/protocol.c index eadca13f..3c966831 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -75,11 +75,11 @@ bool send_request(connection_t *c, const char *format, ...) { input buffer anyway */ va_start(args, format); - len = vsnprintf(buffer, sizeof buffer, format, args); - buffer[sizeof buffer - 1] = 0; + len = vsnprintf(buffer, sizeof(buffer), format, args); + buffer[sizeof(buffer) - 1] = 0; va_end(args); - if(len < 0 || len > sizeof buffer - 1) { + if(len < 0 || len > sizeof(buffer) - 1) { logger(LOG_ERR, "Output buffer overflow while sending request to %s (%s)", c->name, c->hostname); return false;