Merged
Conversation
function TTaurusTLSIOHandlerSocket.TaurusGetProxyTargetHost: string; function TTaurusTLSIOHandlerSocket.TaurusGetURIHost: string; Add comments expaining the warnings I was getting for a few things.
tregubovav-dev
requested changes
Mar 3, 2026
Contributor
tregubovav-dev
left a comment
There was a problem hiding this comment.
All PAL warning suspended with this PR are false-positive warnings.
However, there are a couple issues not related to PAL needs to be reviewed and resolved.
See comments below.
Contributor
There was a problem hiding this comment.
I think this function needs additional failure checks:
function LoadCertificate(const AFileName: String): PX509;
var
LM: TMemoryStream; //PALOFF - Created and freed objects, Local identifiers that possibly are set more than once without referencing in-between
LB: PBIO;
begin
LB:=nil;
LM := TMemoryStream.Create;
try
LM.LoadFromFile(AFileName);
LB := BIO_new_mem_buf(LM.Memory^, LM.Size); //BIO_new_mem_buf may return NULL value
Result := PEM_read_bio_X509(LB, nil, nil, nil); //Is it safe to pass NULL BIO to this routine?
finally
BIO_free(LB);
FreeAndNil(LM);
end;
end;
Contributor
There was a problem hiding this comment.
For example, the 'TaurusTLS_SSL_CTX_use_PrivateKey_file_PKCS12, TaurusTLS_unicode_X509_load_cert_file`, etc. include additional error control to avoid NULL-referenced BIO.
Contributor
There was a problem hiding this comment.
method function TaurusTLS_unicode_X509_load_cert_crl_file:
Variable Linf can reach line 596 uninitialized.
It must be null-assigned explicitly in the beginning of method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.