◐ Shell
clean mode source ↗

gh-111178: fix UBSan failures in `Modules/_ssl/cert.c` by picnixz · Pull Request #129088 · python/cpython

Conversation

encukou

Py_RETURN_NOTIMPLEMENTED;
}
cmp = X509_cmp(self->cert, ((PySSLCertificate*)other)->cert);
cmp = X509_cmp(self->cert, ((PySSLCertificate*)rhs)->cert);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmp = X509_cmp(self->cert, ((PySSLCertificate*)rhs)->cert);
cmp = X509_cmp(self->cert, _PySSLCertificate_CAST(rhs)->cert);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left out fast casts for which the input has already been checked so that if the macro is one day converted to a function with explicit checks, we don't double checks those

@picnixz picnixz deleted the fix/ubsan/ssl-111178 branch

February 2, 2025 21:51

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request

Feb 7, 2025
…H-129088)

fix UBSan failures for `PySSLCertificate`

Labels

2 participants

@picnixz @encukou