resolve an issue found by cppcheck:
[libfreerdp/crypto/certificate.c:315] -> [libfreerdp/crypto/certificate.c:316]: (warning) Either the condition 'if(fingerprint&&fprint)' is redundant or there is possible null pointer dereference: fingerprint.
This commit is contained in:
parent
3470c4d5f8
commit
a9ab65a935
@ -312,9 +312,12 @@ static int certificate_data_match_raw(rdpCertificateStore* certificate_store,
|
|||||||
if (port == certificate_data->port)
|
if (port == certificate_data->port)
|
||||||
{
|
{
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
if (fingerprint)
|
||||||
|
{
|
||||||
match = (strcmp(certificate_data->fingerprint, fingerprint) == 0) ? 0 : -1;
|
match = (strcmp(certificate_data->fingerprint, fingerprint) == 0) ? 0 : -1;
|
||||||
if (fingerprint && fprint)
|
if (fprint)
|
||||||
*fprint = _strdup(fingerprint);
|
*fprint = _strdup(fingerprint);
|
||||||
|
}
|
||||||
if (subject && psubject)
|
if (subject && psubject)
|
||||||
crypto_base64_decode(subject, strlen(subject), (BYTE**)psubject, &outLen);
|
crypto_base64_decode(subject, strlen(subject), (BYTE**)psubject, &outLen);
|
||||||
if (issuer && pissuer)
|
if (issuer && pissuer)
|
||||||
|
Loading…
Reference in New Issue
Block a user