* [B.A.T.M.A.N.] [PATCH] batctl: Force \0 termination of string in bisect_iv
@ 2014-06-12 16:33 Sven Eckelmann
2014-06-14 1:54 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2014-06-12 16:33 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann
This is a part of patch 4faf653307789150f1d40383e95c85a086630378 ("batctl:
Force null termination of string after strncpy") but was forgotten before it
was submitted to the maintainers.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
bisect_iv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bisect_iv.c b/bisect_iv.c
index e5efb89..b748813 100644
--- a/bisect_iv.c
+++ b/bisect_iv.c
@@ -365,6 +365,7 @@ static int routing_table_new(char *orig, char *next_hop, char *old_next_hop, cha
if ((rt_table->num_entries == 1) || (rt_table->num_entries != j + 1)) {
i = rt_table->num_entries;
strncpy(rt_table->entries[i - 1].orig, orig, NAME_LEN);
+ rt_table->entries[i - 1].orig[NAME_LEN - 1] = '\0';
rt_table->entries[i - 1].next_hop = next_hop_node;
rt_table->entries[i - 1].flags = rt_flag;
}
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batctl: Force \0 termination of string in bisect_iv
2014-06-12 16:33 [B.A.T.M.A.N.] [PATCH] batctl: Force \0 termination of string in bisect_iv Sven Eckelmann
@ 2014-06-14 1:54 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2014-06-14 1:54 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
On Thursday 12 June 2014 18:33:43 Sven Eckelmann wrote:
> This is a part of patch 4faf653307789150f1d40383e95c85a086630378 ("batctl:
> Force null termination of string after strncpy") but was forgotten before it
> was submitted to the maintainers.
>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> bisect_iv.c | 1 +
> 1 file changed, 1 insertion(+)
Applied in revision c861e47.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-14 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-12 16:33 [B.A.T.M.A.N.] [PATCH] batctl: Force \0 termination of string in bisect_iv Sven Eckelmann
2014-06-14 1:54 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox