summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/md4.c10
-rw-r--r--src/qcommon/msg.c2
-rw-r--r--src/qcommon/net_ip.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/qcommon/md4.c b/src/qcommon/md4.c
index b37c87b4..0eb23a50 100644
--- a/src/qcommon/md4.c
+++ b/src/qcommon/md4.c
@@ -177,12 +177,10 @@ static void mdfour_update(struct mdfour *md, byte *in, int n)
static void mdfour_result(struct mdfour *md, byte *out)
{
- m = md;
-
- copy4(out, m->A);
- copy4(out+4, m->B);
- copy4(out+8, m->C);
- copy4(out+12, m->D);
+ copy4(out, md->A);
+ copy4(out+4, md->B);
+ copy4(out+8, md->C);
+ copy4(out+12, md->D);
}
static void mdfour(byte *out, byte *in, int n)
diff --git a/src/qcommon/msg.c b/src/qcommon/msg.c
index aaed712a..f7001d7b 100644
--- a/src/qcommon/msg.c
+++ b/src/qcommon/msg.c
@@ -247,7 +247,7 @@ int MSG_ReadBits( msg_t *msg, int bits ) {
}
msg->readcount = (msg->bit>>3)+1;
}
- if ( sgn ) {
+ if ( sgn && bits > 0 && bits < 32 ) {
if ( value & ( 1 << ( bits - 1 ) ) ) {
value |= -1 ^ ( ( 1 << bits ) - 1 );
}
diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c
index fdbe75cc..bb528d99 100644
--- a/src/qcommon/net_ip.c
+++ b/src/qcommon/net_ip.c
@@ -1616,7 +1616,7 @@ Called from NET_Sleep which uses select() to determine which sockets have seen a
void NET_Event(fd_set *fdr)
{
byte bufData[MAX_MSGLEN + 1];
- netadr_t from;
+ netadr_t from = {0};
msg_t netmsg;
while(1)