From: Felix Fietkau Date: Mon, 3 Oct 2011 00:41:20 +0000 (+0200) Subject: proto-shell: fix a typo in string length calculation X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=958012387b5bd493ea5fdabe815e9f4fd4e55dc5;ds=inline proto-shell: fix a typo in string length calculation --- diff --git a/proto-shell.c b/proto-shell.c index 555004e..7eeff28 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -408,7 +408,7 @@ proto_shell_parse_config(struct config_param_list *config, json_object *obj) if (attrs[i].type > BLOBMSG_TYPE_LAST) goto error; - str_len += strlen(attrs[i].name + 1); + str_len += strlen(attrs[i].name) + 1; } str_buf = malloc(str_len);