From 86c25c06c92c18fef862d1cc9459cf78a22f72c7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Mar 2026 00:11:33 +0100 Subject: [PATCH] x509asn1: fix to return error in an error case from `encodeOID()` Found by Codex Security Follow-up to d8b0318ad6da7e51f7c94df00a5f165a52580889 #3582 Closes #20991 --- lib/vtls/x509asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c index b687a60193..fd45285b49 100644 --- a/lib/vtls/x509asn1.c +++ b/lib/vtls/x509asn1.c @@ -442,7 +442,7 @@ static CURLcode encodeOID(struct dynbuf *store, x = 0; do { if(x & 0xFF000000) - return CURLE_OK; + return CURLE_BAD_FUNCTION_ARGUMENT; else if(beg == end) return CURLE_BAD_FUNCTION_ARGUMENT; y = *(const unsigned char *)beg++;