From: divverent Date: Fri, 10 Feb 2012 14:00:18 +0000 (+0000) Subject: fix two seriously wrong memset calls possibly causing crypto connections to fail... X-Git-Tag: xonotic-v0.8.0~96^2~339 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=58c894a58d24891eacf7baca0b813a4941cb07aa fix two seriously wrong memset calls possibly causing crypto connections to fail, or bogus servers in the server list git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11675 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/crypto.c b/crypto.c index dd7fc885..30b9bd86 100644 --- a/crypto.c +++ b/crypto.c @@ -545,7 +545,7 @@ qboolean Crypto_ServerFinishInstance(crypto_t *out, crypto_t *crypto) } CLEAR_CDATA; memcpy(out, crypto, sizeof(*out)); - memset(crypto, 0, sizeof(crypto)); + memset(crypto, 0, sizeof(*crypto)); return true; } diff --git a/netconn.c b/netconn.c index f01c3e05..08d7fe40 100755 --- a/netconn.c +++ b/netconn.c @@ -1588,7 +1588,7 @@ static qboolean NetConn_ClientParsePacket_ServerList_PrepareQuery( int protocol, entry = &serverlist_cache[n]; - memset(entry, 0, sizeof(entry)); + memset(entry, 0, sizeof(*entry)); entry->protocol = protocol; // store the data the engine cares about (address and ping) strlcpy (entry->info.cname, ipstring, sizeof(entry->info.cname));