Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid pointer dereference causes segmentation fault #436

Closed
hashstat opened this issue Feb 15, 2012 · 1 comment
Closed

Invalid pointer dereference causes segmentation fault #436

hashstat opened this issue Feb 15, 2012 · 1 comment

Comments

@hashstat
Copy link

With the latest version of FreeRDP, I was getting a segmentation fault when connecting to a RDP server at work. I tracked down the segfault to libfreerdp-core/crypto.c:crypto_cert_subject_alt_name. It is caused by not protecting the dereference of the lengths variable. Here is a patch that corrects the problem:

--- old/libfreerdp-core/crypto.c    2012-02-15 18:17:54.375999564 +0000
+++ new/libfreerdp-core/crypto.c    2012-02-15 18:18:00.242747241 +0000
@@ -437,7 +437,7 @@
        {
            length = ASN1_STRING_to_UTF8(&string, subject_alt_name->d.dNSName);
            strings[*count] = (char*) string;
-           *lengths[*count] = length;
+           (*lengths)[*count] = length;
            (*count)++;
        }
    }
@awakecoding
Copy link
Member

I just pushed the fix, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants