Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

wz2100-3.2.2: Segmentation fault at start of a multiplayer game on Debian Stretch #4566

Closed
wzdev-ci opened this issue Mar 21, 2017 · 7 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Leverator


Hello,

I just compiled warzone2100-3.2.2 on Debian Stretch and was not able to start a network game.
Every time when I clicked to start the match, the game freezed.

After digging around, I found the problem.
Here's the diff of crc.cpp:
Leverator@calculus:~/Development$ diff /tmp/warzone2100-3.2.2/lib/framework/crc.cpp warzone2100-3.2.2/lib/framework/crc.cpp
259c259,264
< vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);

if ( b.vKey != nullptr )
{
    vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
} else {
    vKey = nullptr;
}

276c281,287
< vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);

if ( b.vKey != nullptr )
{
    vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
} else {
    vKey = nullptr;
}

Now it is fun to play.

Best whishes from germany,
Leverator


Issue migrated from trac:4566 at 2022-04-16 12:41:02 -0700

@wzdev-ci
Copy link
Contributor Author

Leverator changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Leverator commented


Here's the diff again:

Leverator@calculus:~/Development$ diff /tmp/warzone2100-3.2.2/lib/framework/crc.cpp warzone2100-3.2.2/lib/framework/crc.cpp 
259c259,264
<       vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
---
>     if ( b.vKey != nullptr )
>     {
>         vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
>     } else {
>         vKey = nullptr;
>     }
276c281,287
<       vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
---
>     if ( b.vKey != nullptr )
>     {
>         vKey = (void *)EC_KEY_dup((EC_KEY *)b.vKey);
>     } else {
>         vKey = nullptr;
>     }
>     

@wzdev-ci
Copy link
Contributor Author

Cyp <cyp@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Cyp <cyp@...> changed owner from `` to Cyp <cyp@wz2100.net>

@wzdev-ci
Copy link
Contributor Author

Cyp <cyp@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp <cyp@...> committed [382077800]


In Warzone2100/warzone2100@3820778:

#CommitTicketReference repository="" revision="382077800bd98b718fb2bc8221d9d6be66602765"
Never pass nullptr to EC_KEY_dup.

Fixes #4566.

@wzdev-ci
Copy link
Contributor Author

Leverator commented


Thanks!

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

No branches or pull requests

1 participant