summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-10-22 14:38:53 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-10-22 14:38:53 +0200
commit9c3922386e520a997a9a123f739da8e5ab0ab014 (patch)
tree5954c86eff1d7908b1c3a755cd431d3547f4d830
parentd7fcf63504425a73f74f3d1d2f5ba68533280ff4 (diff)
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.
-rw-r--r--board/toradex/common/board.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/board/toradex/common/board.c b/board/toradex/common/board.c
index dab6e838e86..f9af433e873 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;