X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=crypto.c;h=2baa5a97fd0d921a3962f346b47761bc8f6e9deb;hb=c1d4a643adf18663ebfa28124029bc2caab52205;hp=dd7fc885585efcc17ba814697d0f0244a1db251d;hpb=27a6675fdd0dba6c49be768ea7f66e9d8c42bb97;p=xonotic%2Fdarkplaces.git diff --git a/crypto.c b/crypto.c index dd7fc885..2baa5a97 100644 --- a/crypto.c +++ b/crypto.c @@ -102,7 +102,7 @@ static size_t Crypto_UnParsePack(char *buf, size_t len, unsigned long header, co #define USE_AES -#ifdef CRYPTO_STATIC +#ifdef LINK_TO_CRYPTO #include @@ -285,7 +285,7 @@ static void Crypto_CloseLibrary (void) #endif -#ifdef CRYPTO_RIJNDAEL_STATIC +#ifdef LINK_TO_CRYPTO_RIJNDAEL #include @@ -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; } @@ -1040,7 +1040,7 @@ void Crypto_Init(void) return; } - Crypto_Rijndael_OpenLibrary(); // if this fails, it's uncritical + (void) Crypto_Rijndael_OpenLibrary(); // if this fails, it's uncritical Crypto_InitHostKeys(); } @@ -1306,7 +1306,7 @@ static void Crypto_KeyGen_f(void) return; } buf2l += buf2pos; - buf[buf2l] = 0; + buf2[buf2l] = 0; if(!Curl_Begin_ToMemory(buf2, 0, (unsigned char *) keygen_buf, sizeof(keygen_buf), Crypto_KeyGen_Finished, NULL)) { Con_Printf("curl failed\n"); @@ -2158,7 +2158,7 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out, int clientid = -1, serverid = -1, wantserverid = -1; qboolean server_can_auth = true; char wantserver_idfp[FP64_SIZE+1]; - int wantserver_aeslevel; + int wantserver_aeslevel = 0; // if we have a stored host key for the server, assume serverid to already be selected! // (the loop will refuse to overwrite this one then)