]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix incorrect error return value in i2r_ADMISSION_SYNTAX()
authorNiels Dossche <niels.dossche@ugent.be>
Tue, 17 Jan 2023 19:27:49 +0000 (20:27 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 19 Jan 2023 13:15:19 +0000 (14:15 +0100)
The other implementations of i2r return 0 in case of an error, but
i2r_ADMISSION_SYNTAX() returns -1. That means the check on i2r does not
catch the error. Change it to return 0 like the others do.

Fixes: #20066
CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20068)

crypto/x509/v3_admis.c

index cd875e9dd14445b391028bab334bbdaa129c9b34..7aa8a4a420050f7da10b7e7ea244a6b05f961ed6 100644 (file)
@@ -199,7 +199,7 @@ static int i2r_ADMISSION_SYNTAX(const struct v3_ext_method *method, void *in,
     return 1;
 
 err:
-    return -1;
+    return 0;
 }
 
 const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(const NAMING_AUTHORITY *n)