X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=e866e3165ef19f3e3c29686365d024dff6e03e7f;hp=90eca015ea5d5a009749afa27fa1e0e69161a71c;hb=e49891e188f618a0e98f1d30bcbf240286e8ad5c;hpb=0310deb225cad21c458fb32fd589027e3f844735 diff --git a/src/protocol.c b/src/protocol.c index 90eca015..e866e316 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -103,6 +103,7 @@ bool send_request(connection_t *c, const char *format, ...) { } void forward_request(connection_t *from, char *request) { + /* Note: request is not zero terminated anymore after a call to this function! */ ifdebug(PROTOCOL) { ifdebug(META) logger(LOG_DEBUG, "Forwarding %s from %s (%s): %s", @@ -113,7 +114,7 @@ void forward_request(connection_t *from, char *request) { } int len = strlen(request); - request[len] = '\n'; + request[len++] = '\n'; broadcast_meta(from, request, len); }