X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_misc.c;h=22b204d9f2f3dcaabef9ab521e5418cf058ff383;hp=c08a0d16f564a076a6262303b58ac41ceb046fcd;hb=2116c6eb7d328c7aa3ce3da54f95367e5199d373;hpb=aaa17884166350b60ab5896bcf408eea665a0404 diff --git a/src/protocol_misc.c b/src/protocol_misc.c index c08a0d16..22b204d9 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -146,9 +146,9 @@ bool send_tcppacket(connection_t *c, const vpn_packet_t *packet) { } bool tcppacket_h(connection_t *c) { - short int len; + length_t len; - if(sscanf(c->buffer, "%*d %hd", &len) != 1) { + if(sscanf(c->buffer, "%*d %hu", &len) != 1) { logger(LOG_ERR, "Got bad %s from %s (%s)", "PACKET", c->name, c->hostname); return false;