Fixed GHSL-2020-101 missing NULL check
authorakallabeth <akallabeth@posteo.net>
Tue, 19 May 2020 05:48:07 +0000 (07:48 +0200)
committerakallabeth <akallabeth@posteo.net>
Wed, 20 May 2020 13:41:24 +0000 (15:41 +0200)
(cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e)

libfreerdp/core/security.c

index bce1855..e6571c3 100644 (file)
@@ -816,6 +816,9 @@ BOOL security_fips_decrypt(BYTE* data, size_t length, rdpRdp* rdp)
 {
        size_t olen;
 
+       if (!rdp || !rdp->fips_decrypt)
+               return FALSE;
+
        if (!winpr_Cipher_Update(rdp->fips_decrypt, data, length, data, &olen))
                return FALSE;