asn1: Fix UB in two tests
This commit is contained in:
@@ -160,12 +160,12 @@ test_integer_more (void)
|
||||
|
||||
n2 = 0;
|
||||
for (i = 0; i < (sizeof(int) * 8); i++) {
|
||||
n1 = 0x01 << i;
|
||||
n1 = 1LL << i;
|
||||
n2 = n2 | n1;
|
||||
n3 = ~n1;
|
||||
n4 = ~n2;
|
||||
n5 = (-1) & ~(0x3f << i);
|
||||
n6 = (-1) & ~(0x7f << i);
|
||||
n5 = (-1LL) & ~(0x3fLL << i);
|
||||
n6 = (-1LL) & ~(0x7fLL << i);
|
||||
|
||||
test_one_int(n1);
|
||||
test_one_int(n2);
|
||||
|
||||
@@ -2014,7 +2014,7 @@ test_seq4 (void)
|
||||
b2val[3].u2 = -1LL;
|
||||
b2val[3].s3.data = rk_UNCONST("\x00\x01\x02\x03");
|
||||
b2val[3].s3.length = 4;
|
||||
b2val[3].u3 = 1LL<<63;
|
||||
b2val[3].u3 = 1ULL<<63;
|
||||
|
||||
b3val[3].s1.data = rk_UNCONST("");
|
||||
b3val[3].s1.length = 0;
|
||||
@@ -2024,7 +2024,7 @@ test_seq4 (void)
|
||||
b3val[3].u2 = -1LL;
|
||||
b3val[3].s3.data = rk_UNCONST("\x00\x01\x02\x03");
|
||||
b3val[3].s3.length = 4;
|
||||
b3val[3].u3 = 1LL<<63;
|
||||
b3val[3].u3 = 1ULL<<63;
|
||||
b3val[3].s4.data = rk_UNCONST("\x00");
|
||||
b3val[3].s4.length = 1;
|
||||
b3val[3].u4 = 1LL<<32;
|
||||
|
||||
Reference in New Issue
Block a user