[U-Boot] [PATCH] rockchip: puma_rk3399: increase serialno_str size

Klaus Goger klaus.goger at theobroma-systems.com
Fri Sep 15 12:46:04 UTC 2017


Increase serialno_str to 17 bytes so it can hold the 16 bytes long serial
nummer and the terminating null byte added by snprintf.

Signed-off-by: Klaus Goger <klaus.goger at theobroma-systems.com>

---

 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index b49fa66fb3..dab37d2673 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -96,7 +96,7 @@ static void setup_serial(void)
 	u8 low[cpuid_length/2], high[cpuid_length/2];
 	char cpuid_str[cpuid_length * 2 + 1];
 	u64 serialno;
-	char serialno_str[16];
+	char serialno_str[17];
 
 	/* retrieve the device */
 	ret = uclass_get_device_by_driver(UCLASS_MISC,
-- 
2.11.0



More information about the U-Boot mailing list