26 lines
782 B
Diff
26 lines
782 B
Diff
From f298f9aaef28f5846b746e1c9596ad9d8c85b155 Mon Sep 17 00:00:00 2001
|
|
From: Huaxin Lu <luhuaxin1@huawei.com>
|
|
Date: Mon, 19 Feb 2024 10:01:41 +0800
|
|
Subject: [PATCH 19/26] Fix potential integer overflow
|
|
|
|
---
|
|
src/core/tasks/dim_core_measure_kernel.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/core/tasks/dim_core_measure_kernel.c b/src/core/tasks/dim_core_measure_kernel.c
|
|
index d49095b..077f30a 100644
|
|
--- a/src/core/tasks/dim_core_measure_kernel.c
|
|
+++ b/src/core/tasks/dim_core_measure_kernel.c
|
|
@@ -21,7 +21,7 @@
|
|
|
|
static int code_cmp(const void *a, const void *b)
|
|
{
|
|
- return *(unsigned long *)a - *(unsigned long *)b;
|
|
+ return *(unsigned long *)a > *(unsigned long *)b ? 1 : 0;
|
|
}
|
|
|
|
static int sort_jump_table(struct jump_entry *sjump,
|
|
--
|
|
2.33.0
|
|
|