From: Andreas Steffen Date: Fri, 29 Jul 2016 10:34:40 +0000 (+0200) Subject: vici: Increased various string buffers to BUF_LEN (512 bytes) X-Git-Tag: 5.5.1dr1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f65a8c2718756762ff8772e6e5f766293c50446;p=thirdparty%2Fstrongswan.git vici: Increased various string buffers to BUF_LEN (512 bytes) --- diff --git a/src/libcharon/plugins/vici/vici_config.c b/src/libcharon/plugins/vici/vici_config.c index d919e1d94d..daefcaae5d 100644 --- a/src/libcharon/plugins/vici/vici_config.c +++ b/src/libcharon/plugins/vici/vici_config.c @@ -503,7 +503,7 @@ static void free_child_data(child_data_t *data) */ static bool parse_proposal(linked_list_t *list, protocol_id_t proto, chunk_t v) { - char buf[128]; + char buf[BUF_LEN]; proposal_t *proposal; if (!vici_stringify(v, buf, sizeof(buf))) @@ -566,7 +566,7 @@ CALLBACK(parse_ah_proposal, bool, CALLBACK(parse_ts, bool, linked_list_t *out, chunk_t v) { - char buf[128], *protoport, *sep, *port = "", *end; + char buf[BUF_LEN], *protoport, *sep, *port = "", *end; traffic_selector_t *ts = NULL; struct protoent *protoent; struct servent *svc; @@ -720,7 +720,7 @@ typedef struct { */ static bool parse_map(enum_map_t *map, int count, int *out, chunk_t v) { - char buf[128]; + char buf[BUF_LEN]; int i; if (!vici_stringify(v, buf, sizeof(buf))) @@ -1051,7 +1051,7 @@ CALLBACK(parse_auth, bool, */ static bool parse_id(auth_cfg_t *cfg, auth_rule_t rule, chunk_t v) { - char buf[256]; + char buf[BUF_LEN]; if (!vici_stringify(v, buf, sizeof(buf))) { diff --git a/src/swanctl/commands/load_conns.c b/src/swanctl/commands/load_conns.c index 87526bc79e..2e443a94ab 100644 --- a/src/swanctl/commands/load_conns.c +++ b/src/swanctl/commands/load_conns.c @@ -221,7 +221,7 @@ static bool load_conn(vici_conn_t *conn, settings_t *cfg, vici_req_t *req; vici_res_t *res; bool ret = TRUE; - char buf[128]; + char buf[BUF_LEN]; snprintf(buf, sizeof(buf), "%s.%s", "connections", section);