[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28229 - gnunet/src/exit
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28229 - gnunet/src/exit |
Date: |
Sun, 21 Jul 2013 18:29:30 +0200 |
Author: grothoff
Date: 2013-07-21 18:29:30 +0200 (Sun, 21 Jul 2013)
New Revision: 28229
Modified:
gnunet/src/exit/gnunet-daemon-exit.c
Log:
-do NULL check before dereferencing
Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c 2013-07-21 16:27:21 UTC (rev
28228)
+++ gnunet/src/exit/gnunet-daemon-exit.c 2013-07-21 16:29:30 UTC (rev
28229)
@@ -1807,6 +1807,11 @@
const struct GNUNET_EXIT_TcpServiceStartMessage *start;
uint16_t pkt_len = ntohs (message->size);
+ if (NULL == state)
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
if (GNUNET_YES == state->is_dns)
{
GNUNET_break_op (0);
@@ -1831,8 +1836,7 @@
}
start = (const struct GNUNET_EXIT_TcpServiceStartMessage*) message;
pkt_len -= sizeof (struct GNUNET_EXIT_TcpServiceStartMessage);
- if ( (NULL == state) ||
- (NULL != state->specifics.tcp_udp.serv) ||
+ if ( (NULL != state->specifics.tcp_udp.serv) ||
(NULL != state->specifics.tcp_udp.heap_node) )
{
GNUNET_break_op (0);
@@ -1896,6 +1900,11 @@
const void *payload;
int af;
+ if (NULL == state)
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
if (GNUNET_YES == state->is_dns)
{
GNUNET_break_op (0);
@@ -1919,8 +1928,7 @@
}
start = (const struct GNUNET_EXIT_TcpInternetStartMessage*) message;
pkt_len -= sizeof (struct GNUNET_EXIT_TcpInternetStartMessage);
- if ( (NULL == state) ||
- (NULL != state->specifics.tcp_udp.serv) ||
+ if ( (NULL != state->specifics.tcp_udp.serv) ||
(NULL != state->specifics.tcp_udp.heap_node) )
{
GNUNET_break_op (0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28229 - gnunet/src/exit,
gnunet <=