aboutsummaryrefslogtreecommitdiff
path: root/src/dns/dnsparser.c
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/dns/dnsparser.c
parent12e8bf797642f7c0fef0b98b52227469c2a3bbe2 (diff)
-bugfixes
git-svn-id: https://gnunet.org/svn/gnunet@18981 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/dns/dnsparser.c')
-rw-r--r--src/dns/dnsparser.c6
1 files changed, 3 insertions, 3 deletions
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;
}