From: Peter Krempa <[email protected]> The buffer is already terminated. Luckily the last character in the buffer was a newline so no information was mangled.
Signed-off-by: Peter Krempa <[email protected]> --- src/util/virnetdevip.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 8786bb236e..c82125b706 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -547,10 +547,6 @@ virNetDevIPCheckIPv6Forwarding(void) return false; } - /* Dropping the last character to stop the loop */ - if (len > 0) - buf[len-1] = '\0'; - cur = buf; while (cur) { char route[33], flags[9], iface[9]; -- 2.53.0
