Skip to content

Broken code in lib/vtls/x509asn1.c Curl_verifyhost #10163

@piru

Description

@piru

Description

Curl_verifyhost has some broken code due to recent code shuffling. The issue is visible here:
https://github.com/curl/curl/blob/curl-7_87_0/lib/vtls/x509asn1.c#L1355

The code doesn't compile and it also leaks some memory for empty ("") strings if parenthesis are added. The issue was introduced by commit 6b19247

The easiest solution is to revert the first section of the patch. Note how utf8asn1str always sets the pointer to NULL on error.

curl/libcurl version

curl-7_87_0 tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions