From 9c3922386e520a997a9a123f739da8e5ab0ab014 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Oct 2013 14:38:53 +0200 Subject: apalis/colibri_t20/30: fix further issue in HCD conversion Fix possible uninitialised array member issue in serial number to hexadecimal coded decimal conversion routine. --- board/toradex/common/board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/toradex/common/board.c b/board/toradex/common/board.c index dab6e838e8..f9af433e87 100644 --- a/board/toradex/common/board.c +++ b/board/toradex/common/board.c @@ -748,6 +748,9 @@ void get_board_serial(struct tag_serialnr *serialnr) array[i--] = serial % 10; serial /= 10; } + while (i >= 0) { + array[i--] = 0; + } serial = array[0]; for (i = 1; i < 8; i++) { serial *= 16; -- cgit v1.2.3