Blame SOURCES/0121-tc_util-No-need-to-terminate-an-snprintf-ed-buffer.patch

99be8f
From 42b9cc605f54f2a3ad75a29b5f2fc308bfe5fc61 Mon Sep 17 00:00:00 2001
99be8f
From: Andrea Claudi <aclaudi@redhat.com>
99be8f
Date: Mon, 29 Apr 2019 20:09:12 +0200
99be8f
Subject: [PATCH] tc_util: No need to terminate an snprintf'ed buffer
99be8f
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
99be8f
Upstream Status: iproute2.git commit 9376314b49a47
99be8f
99be8f
commit 9376314b49a47eb42ade3fc0d41cb51438f8dbc6
99be8f
Author: Phil Sutter <phil@nwl.cc>
99be8f
Date:   Fri Sep 1 18:52:55 2017 +0200
99be8f
99be8f
    tc_util: No need to terminate an snprintf'ed buffer
99be8f
99be8f
    snprintf() won't leave the buffer unterminated, so manually terminating
99be8f
    is not necessary here.
99be8f
99be8f
    Signed-off-by: Phil Sutter <phil@nwl.cc>
99be8f
---
99be8f
 tc/tc_util.c | 1 -
99be8f
 1 file changed, 1 deletion(-)
99be8f
99be8f
diff --git a/tc/tc_util.c b/tc/tc_util.c
99be8f
index 24ca1f1c1c040..296825ae174e0 100644
99be8f
--- a/tc/tc_util.c
99be8f
+++ b/tc/tc_util.c
99be8f
@@ -430,7 +430,6 @@ const char *action_n2a(int action)
99be8f
 		return "stolen";
99be8f
 	default:
99be8f
 		snprintf(buf, 64, "%d", action);
99be8f
-		buf[63] = '\0';
99be8f
 		return buf;
99be8f
 	}
99be8f
 }
99be8f
-- 
99be8f
2.20.1
99be8f