]> git.ipfire.org Git - thirdparty/ldns.git/commit
ldns_dane_match_any_cert_with_data: fix types 241/head
authorEnji Cooper <yaneurabeya@gmail.com>
Thu, 6 Jun 2024 05:27:34 +0000 (22:27 -0700)
committerEnji Cooper <yaneurabeya@gmail.com>
Thu, 6 Jun 2024 05:31:48 +0000 (22:31 -0700)
commit388e124841c208b3e8dc39c804e7f3679d30e706
tree50545e9a696dd36bec41d540c12cd99ea167b326
parent5afb814854322854425320b781e286b79a1be7ea
ldns_dane_match_any_cert_with_data: fix types

Both `i` and `n` should match the return type for `sk_X509_num` (which
is `int`, not `size_t`). This addresses a potential issue where
`sk_X509_num(..)` could return -1, resulting in an unnecessary number of
loop iterations and undesirable behavior.

Reported by: Coverity
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
dane.c