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

De-memsetify Wii_SSL and fix segfault. #1704

Merged
merged 1 commit into from Dec 20, 2014

Conversation

phire
Copy link
Member

@phire phire commented Dec 15, 2014

Fixes #7917
The first memset was clearing the delicate bits of the std::string in the struct, causing segfaults.

I also removed the rest of the memsets because they were paranoid, unneeded and wasteful. We shouldn't be managing the ssl libraries structs for it.
I checked and the ssl library's functions were already memsetting those structs as needed.

Fixes dolphin-emu#7917
The first memset was clearing the delicate bits of the std::string
in the struct, causing segfaults.

I also removed the rest of the memsets because they were paranoid,
unneeded and waseful. We shouldn't be managing the ssl libraries
structs for it.
I checked and the ssl library's functions were already memsetting
those structs as needed.
@@ -15,7 +15,7 @@ CWII_IPC_HLE_Device_net_ssl::CWII_IPC_HLE_Device_net_ssl(u32 _DeviceID, const st
{
for (WII_SSL& ssl : _SSL)
{
memset(&ssl, 0, sizeof(WII_SSL));
ssl.active = false;
}

This comment was marked as off-topic.

@waddlesplash
Copy link
Contributor

LGTM

@JMC47
Copy link
Contributor

JMC47 commented Dec 18, 2014

This fixes a crash when games attempt to connect online for me.

@Parlane
Copy link
Member

Parlane commented Dec 20, 2014

This is not the full fix needed, that will come later. This fixes the issue at hand though.

Parlane added a commit that referenced this pull request Dec 20, 2014
De-memsetify Wii_SSL and fix segfault.
@Parlane Parlane merged commit 6a785af into dolphin-emu:master Dec 20, 2014
@phire phire deleted the wii_ssl_segfault branch July 4, 2015 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants