summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-03-01 16:12:28 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-03-01 16:12:28 +0000
commitbd9b3cf55be5843eee108658acb05a494645caad (patch)
tree407ff60ada539fb842d34bd012c61c3ba21caf48
parent14db4212ab3a4de8d15b9f3f3663e8c9065f1f83 (diff)
downloaddnsmasq-bd9b3cf55be5843eee108658acb05a494645caad.tar.gz
Fix off-by-one overwrite.
-rw-r--r--src/dnssec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dnssec.c b/src/dnssec.c
index 0f95f4a..2d00570 100644
--- a/src/dnssec.c
+++ b/src/dnssec.c
@@ -353,7 +353,8 @@ static void from_wire(char *name)
l[len] = '.';
}
- *(l-1) = 0;
+ if (l != name)
+ *(l-1) = 0;
}
/* Input in presentation format */