From 8615e2c8e5a0964b871282582127e4a6aad763a5 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Tue, 14 Oct 2014 16:00:42 +0800 Subject: [PATCH] kernel/timer: change row_lvl to unsigned Use signed int as array index is unsecure. --- src/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timer.c b/src/timer.c index f71e40fcd6..ba2801530d 100644 --- a/src/timer.c +++ b/src/timer.c @@ -293,7 +293,7 @@ RTM_EXPORT(rt_timer_delete); */ rt_err_t rt_timer_start(rt_timer_t timer) { - int row_lvl; + unsigned int row_lvl; rt_list_t *timer_list; register rt_base_t level; rt_list_t *row_head[RT_TIMER_SKIP_LIST_LEVEL];