stest_common: Set Max value for 64bit bitmask 60/307260/1 accepted/tizen_unified_toolchain accepted/tizen/unified/20240307.075506 accepted/tizen/unified/toolchain/20240311.065601 accepted/tizen/unified/x/20240308.033715
authorUnsung Lee <unsung.lee@samsung.com>
Wed, 6 Mar 2024 10:23:28 +0000 (19:23 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Wed, 6 Mar 2024 10:27:22 +0000 (19:27 +0900)
Set Max value for 64bit bitmask to avoid set mask for over than 64bit.

The problem is reported by SVACE with id = 700538.

Change-Id: I04a7be9ba3c0c8de94de6f63e75bb37eef207115
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/stest_common.c

index 30de9b4..589a441 100644 (file)
@@ -45,7 +45,7 @@ void prepare_mask(int argc, char* argv[])
                test_cases_mask = 0;
                for (; i < argc; i++) {
                        int val = strtol(argv[i], NULL, 10);
-                       if (val >= 0)
+                       if (val >= 0 && val < 64)
                                test_cases_mask |= (1<<val);
                }
        }