X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=baf9eac188f4ca909417fd6ad00278352d3f87ff;hp=31906bab49ed22d8ec6795a698383ca04c7f3c94;hb=9527f4f22cd71feeee8a49866e29cce98408f1e7;hpb=18646deca120f0ccc3bfad643dba83547ecc2f20 diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 31906bab..baf9eac1 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -281,7 +281,7 @@ static bool receive_invitation_sptps(void *handle, uint8_t type, const void *dat bool id_h(connection_t *c, const char *request) { char name[MAX_STRING_SIZE]; - if(sscanf(request, "%*d " MAX_STRING " %d.%d", name, &c->protocol_major, &c->protocol_minor) < 2) { + if(sscanf(request, "%*d " MAX_STRING " %2d.%3d", name, &c->protocol_major, &c->protocol_minor) < 2) { logger(DEBUG_ALWAYS, LOG_ERR, "Got bad %s from %s (%s)", "ID", c->name, c->hostname); return false;