summaryrefslogtreecommitdiff
path: root/lib/stdlib/printf.c
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2015-09-28 16:32:38 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2015-09-28 16:33:00 +0100
commit543128771c59e9f1ee91c245d342e929d5ba7fa1 (patch)
tree5081b28baa8a20741e433b842656312028b79da2 /lib/stdlib/printf.c
parent7dc28e9c6e577c5151d0a6df7165f7d21f509f5f (diff)
Bug fix in the SP804 dual timer driver
The generic delay timer driver expects a pointer to a timer_ops_t structure containing the specific timer driver information. It doesn't make a copy of the structure, instead it just keeps the pointer. Therefore, this pointer must remain valid over time. The SP804 driver doesn't satisfy this requirement. The sp804_timer_init() macro creates a temporary instanciation of the timer_ops_t structure on the fly and passes it to the generic delay timer. When this temporary instanciation gets deallocated, the generic delay timer is left with a pointer to invalid data. This patch fixes this bug by statically allocating the SP804 timer_ops_t structure. Change-Id: I8fbf75907583aef06701e3fd9fabe0b2c9bc95bf
Diffstat (limited to 'lib/stdlib/printf.c')
0 files changed, 0 insertions, 0 deletions