From: Christian Grothoff Date: Wed, 15 Apr 2020 18:26:00 +0000 (+0200) Subject: fix #6184 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b7be5b9f5d3e5ca4be1aaf663b271cdde0f69ef4;p=oweals%2Fgnunet.git fix #6184 --- diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index c0572fe40..956faf983 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -3012,6 +3012,9 @@ signal_socks_failure (struct Socks5Request *s5r, { struct Socks5ServerResponseMessage *s_resp; + GNUNET_break (0 == s5r->wbuf_len); /* Should happen first in any transmission, right? */ + GNUNET_assert (SOCKS_BUFFERSIZE - s5r->wbuf_len >= + sizeof(struct Socks5ServerResponseMessage)); s_resp = (struct Socks5ServerResponseMessage *) &s5r->wbuf[s5r->wbuf_len]; memset (s_resp, 0, sizeof(struct Socks5ServerResponseMessage)); s_resp->version = SOCKS_VERSION_5; diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h index 064f38c9f..82b8502e0 100644 --- a/src/include/gnunet_json_lib.h +++ b/src/include/gnunet_json_lib.h @@ -49,9 +49,10 @@ struct GNUNET_JSON_Specification; * @return #GNUNET_SYSERR on error, * #GNUNET_OK on success */ -typedef int (*GNUNET_JSON_Parser) (void *cls, - json_t *root, - struct GNUNET_JSON_Specification *spec); +typedef int +(*GNUNET_JSON_Parser) (void *cls, + json_t *root, + struct GNUNET_JSON_Specification *spec); /** @@ -60,8 +61,9 @@ typedef int (*GNUNET_JSON_Parser) (void *cls, * @param cls closure * @param spec our specification entry with data to clean. */ -typedef void (*GNUNET_JSON_Cleaner) (void *cls, - struct GNUNET_JSON_Specification *spec); +typedef void +(*GNUNET_JSON_Cleaner) (void *cls, + struct GNUNET_JSON_Specification *spec); /**