mini-os: tpm: fix array access in locality_enabled
authorOlaf Hering <olaf@aepfle.de>
Tue, 22 Jul 2014 07:19:15 +0000 (09:19 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Jul 2014 15:23:18 +0000 (16:23 +0100)
commit52bdfeacbb601da2d66b5b1dde159b973ee8b309
tree7c7dc0b904d234fefb41e23c9042107046580e52
parent597eaa8db932741f4b49336d5638c5a1833d4f2f
mini-os: tpm: fix array access in locality_enabled

gcc-4.3 fails to prove that array indices will remain positive. Add a
hint for the compiler and check the index value before using it.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
extras/mini-os/tpm_tis.c