]> git.ipfire.org Git - thirdparty/openssl.git/commit
test/radix/terp.c: avoid accessing uninitialised terp on error
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 15 Sep 2025 03:27:58 +0000 (05:27 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 25 Sep 2025 14:59:14 +0000 (16:59 +0200)
commita9acf74ecf10f64a59557519f5e9bed847e84b38
tree2840b62c72b66a217cd62a9c4547cf15d5e233ab
parent7977ce5bb233cbb9de4a1bae4ae0511432724822
test/radix/terp.c: avoid accessing uninitialised terp on error

Stats printing in TERP_run() assumes that terp has been initialised,
which is not the case when a jump to the err label has been performed
before successful TERP_init() call;  avoid it by enframing the offending
call within a have_terp guard check.

Fixes: 4a2d5fe812f8 "QUIC RADIX: Add RADIX test framework implementation"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665430
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28647)

(cherry picked from commit 84432e9b6cb88767a8225a53baa812efd22aaa1b)
test/radix/terp.c