aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-01-04 12:36:43 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-01-04 12:36:43 +0000
commit8bd3547b9956cad9aed40f01f7a7557f713dc7ab (patch)
tree589d9590dc57dcde72e675848e9f50cc9e22ac2f /src
parent12e8bf797642f7c0fef0b98b52227469c2a3bbe2 (diff)
-bugfixes
git-svn-id: https://gnunet.org/svn/gnunet@18981 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src')
-rw-r--r--src/dns/Makefile.am11
-rw-r--r--src/dns/dnsparser.c6
-rw-r--r--src/dns/gnunet-service-dns_new.c9
3 files changed, 19 insertions, 7 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am
index 674f4bf577..6322f2ca65 100644
--- a/src/dns/Makefile.am
+++ b/src/dns/Makefile.am
@@ -34,6 +34,9 @@ lib_LTLIBRARIES = \
bin_PROGRAMS = \
gnunet-service-dns gnunet-service-dns-new $(HIJACKBIN)
+noinst_PROGRAMS = \
+ gnunet-dns-monitor
+
plugin_LTLIBRARIES = \
libgnunet_plugin_block_dns.la
@@ -55,6 +58,14 @@ gnunet_service_dns_LDADD = \
$(top_builddir)/src/dns/libgnunetdnsparser.la \
$(GN_LIBINTL)
+gnunet_dns_monitor_SOURCES = \
+ gnunet-dns-monitor.c
+gnunet_dns_monitor_LDADD = \
+ $(top_builddir)/src/dns/libgnunetdnsparser.la \
+ $(top_builddir)/src/dns/libgnunetdnsnew.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(GN_LIBINTL)
+
gnunet_service_dns_new_SOURCES = \
gnunet-service-dns_new.c
gnunet_service_dns_new_LDADD = \
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 2cd728f37d..2a3fd55c08 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -82,7 +82,7 @@ parse_name (const char *udp_payload,
ret = GNUNET_strdup ("");
while (1)
{
- if (*off == udp_payload_length)
+ if (*off >= udp_payload_length)
goto error;
len = input[*off];
if (0 == len)
@@ -98,7 +98,7 @@ parse_name (const char *udp_payload,
&udp_payload[*off + 1]);
GNUNET_free (ret);
ret = tmp;
- off += 1 + len;
+ *off += 1 + len;
}
else if ((64 | 128) == (len & (64 | 128)) )
{
@@ -116,7 +116,7 @@ parse_name (const char *udp_payload,
GNUNET_free (ret);
GNUNET_free (xstr);
ret = tmp;
- off += 2;
+ *off += 2;
/* pointers always terminate names */
break;
}
diff --git a/src/dns/gnunet-service-dns_new.c b/src/dns/gnunet-service-dns_new.c
index 8918039d17..bf2368faa2 100644
--- a/src/dns/gnunet-service-dns_new.c
+++ b/src/dns/gnunet-service-dns_new.c
@@ -1049,10 +1049,11 @@ handle_client_response (void *cls GNUNET_UNUSED,
rr->client_wait_list_length,
0);
}
- next_phase (rr);
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
- return;
- }
+ break;
+ }
+ next_phase (rr);
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ return;
}
/* odd, client was not on our list for the request, that ought
to be an error */