diff options
-rw-r--r-- | src/transport/gnunet-service-transport.c | 5 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index c96652c75..56480d020 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1108,7 +1108,10 @@ read_blacklist_file (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
1108 | GNUNET_free (data); | 1108 | GNUNET_free (data); |
1109 | return; | 1109 | return; |
1110 | } | 1110 | } |
1111 | tsize = tsize; | 1111 | |
1112 | if (tsize < 1) | ||
1113 | continue; | ||
1114 | |||
1112 | transport_name = GNUNET_malloc(tsize + 1); | 1115 | transport_name = GNUNET_malloc(tsize + 1); |
1113 | memcpy(transport_name, &data[pos], tsize); | 1116 | memcpy(transport_name, &data[pos], tsize); |
1114 | pos = colon_pos + 1; | 1117 | pos = colon_pos + 1; |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 0d01e6c97..0f424b38a 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -830,7 +830,6 @@ process_interfaces (void *cls, | |||
830 | struct IPv6UdpAddress t6; | 830 | struct IPv6UdpAddress t6; |
831 | void *arg; | 831 | void *arg; |
832 | uint16_t args; | 832 | uint16_t args; |
833 | |||
834 | void *addr_nat; | 833 | void *addr_nat; |
835 | 834 | ||
836 | addr_nat = NULL; | 835 | addr_nat = NULL; |
@@ -886,6 +885,11 @@ process_interfaces (void *cls, | |||
886 | arg = &t6; | 885 | arg = &t6; |
887 | args = sizeof (t6); | 886 | args = sizeof (t6); |
888 | } | 887 | } |
888 | else | ||
889 | { | ||
890 | GNUNET_break (0); | ||
891 | return GNUNET_OK; | ||
892 | } | ||
889 | 893 | ||
890 | GNUNET_log (GNUNET_ERROR_TYPE_INFO | | 894 | GNUNET_log (GNUNET_ERROR_TYPE_INFO | |
891 | GNUNET_ERROR_TYPE_BULK, | 895 | GNUNET_ERROR_TYPE_BULK, |
@@ -1196,7 +1200,7 @@ udp_demultiplexer(struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, | |||
1196 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "udp", | 1200 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "udp", |
1197 | _("Received PROBE REPLY from port %d on incoming port %d\n"), ntohs(((struct sockaddr_in *)sender_addr)->sin_port), sockinfo->port); | 1201 | _("Received PROBE REPLY from port %d on incoming port %d\n"), ntohs(((struct sockaddr_in *)sender_addr)->sin_port), sockinfo->port); |
1198 | #endif | 1202 | #endif |
1199 | if (sizeof(sender_addr) == sizeof(struct IPv4UdpAddress)) | 1203 | if ((sender_addr != NULL) && (sizeof(sender_addr) == sizeof(struct IPv4UdpAddress))) |
1200 | { | 1204 | { |
1201 | memset(&addr_buf, 0, sizeof(addr_buf)); | 1205 | memset(&addr_buf, 0, sizeof(addr_buf)); |
1202 | if (NULL == inet_ntop (AF_INET, | 1206 | if (NULL == inet_ntop (AF_INET, |