X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fmeta.c;h=ee55ecd78b18050b75bed958cb5cce6b71f7d22a;hp=49308184c53f06f9326c753043c0f69058798be7;hb=2116c6eb7d328c7aa3ce3da54f95367e5199d373;hpb=aaa17884166350b60ab5896bcf408eea665a0404 diff --git a/src/meta.c b/src/meta.c index 49308184..ee55ecd7 100644 --- a/src/meta.c +++ b/src/meta.c @@ -59,7 +59,7 @@ bool send_meta(connection_t *c, const char *buffer, int length) { /* Add our data to buffer */ if(c->status.encryptout) { /* Check encryption limits */ - if(length > c->outbudget) { + if((uint64_t)length > c->outbudget) { ifdebug(META) logger(LOG_ERR, "Byte limit exceeded for encryption to %s (%s)", c->name, c->hostname); return false; } else { @@ -174,7 +174,7 @@ bool receive_meta(connection_t *c) { /* Is it proxy metadata? */ if(c->allow_request == PROXY) { - reqlen = receive_proxy_meta(c, oldlen, lenin); + reqlen = receive_proxy_meta(c); if(reqlen < 0) { return false; @@ -187,7 +187,7 @@ bool receive_meta(connection_t *c) { if(c->status.decryptin && !decrypted) { /* Check decryption limits */ - if(lenin > c->inbudget) { + if((uint64_t)lenin > c->inbudget) { ifdebug(META) logger(LOG_ERR, "Byte limit exceeded for decryption from %s (%s)", c->name, c->hostname); return false; } else {