tcos: prevent out of bounds read
Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27719
This commit is contained in:
parent
3ffe24cfb6
commit
78cdab949f
|
@ -152,7 +152,7 @@ static int insert_key(
|
|||
sc_log(ctx, "No EF_KEYD-Record found\n");
|
||||
return 1;
|
||||
}
|
||||
for (i = 0; i < r; i += 2 + buf[i + 1]) {
|
||||
for (i = 0; i + 1 < r; i += 2 + buf[i + 1]) {
|
||||
if (buf[i] == 0xB6)
|
||||
can_sign++;
|
||||
if (buf[i] == 0xB8)
|
||||
|
|
Loading…
Reference in New Issue