From 5e22764d79e42345d512216f07880fdd8db2edf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C5=ABnas=20Ma=C5=BEeikis?= Date: Wed, 22 May 2019 21:41:19 +0300 Subject: Protocol: fixed a off-by-one error when copying a string. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ramūnas Mažeikis --- src/common/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/protocol.c b/src/common/protocol.c index d3317e3..8680be7 100644 --- a/src/common/protocol.c +++ b/src/common/protocol.c @@ -41,7 +41,7 @@ int push_tlv(struct tlv_packet *packet, enum tlv_type type, char *data) switch (type) { case TEXT: - size = strlen(data); + size = strlen(data) + 1; break; case FPI1: size = sizeof(fpi1_t); -- cgit v1.2.3