X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeta.c;h=6054427ce62b0d64b8a283f109afc7dfe7a3c3c7;hb=075e6828a7533e7daa790225f17aa6bb39703278;hp=aaa5c30cc313f9e7572f188d71be627893bc9dc7;hpb=046158a216e78a0412186ec8463157f6bce45d5d;p=meshlink diff --git a/src/meta.c b/src/meta.c index aaa5c30c..6054427c 100644 --- a/src/meta.c +++ b/src/meta.c @@ -35,6 +35,11 @@ bool send_meta(connection_t *c, const char *buffer, int length) { cp(); + if(!c) { + logger(LOG_ERR, _("send_meta() called with NULL pointer!")); + abort(); + } + ifdebug(META) logger(LOG_DEBUG, _("Sending %d bytes of metadata to %s (%s)"), length, c->name, c->hostname); @@ -112,7 +117,7 @@ bool receive_meta(connection_t *c) { bufp = endp; } else { size_t outlen = inlen; - ifdebug(META) logger(LOG_DEBUG, _("Received encrypted %d bytes"), inlen); + ifdebug(META) logger(LOG_DEBUG, _("Received encrypted %zu bytes"), inlen); evbuffer_expand(c->buffer->input, c->buffer->input->off + inlen); if(!cipher_decrypt(&c->incipher, bufp, inlen, c->buffer->input->buffer + c->buffer->input->off, &outlen, false) || inlen != outlen) {