]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
fix eui48 and eui64.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 31 Jan 2014 13:46:14 +0000 (14:46 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 31 Jan 2014 13:46:14 +0000 (14:46 +0100)
str2host.c

index 26cef3d036e1f5eede5b9431f62a0c097590b89b..24c6a3cbec5963e8be7e4f7ea38bce98354fb266 100644 (file)
@@ -1363,9 +1363,7 @@ ldns_str2rdf_eui48(ldns_rdf **rd, const char *str)
 
        if (sscanf(str, "%2x-%2x-%2x-%2x-%2x-%2x%n",
                        &a, &b, &c, &d, &e, &f, &l) != 6 ||
-                       l != (int)strlen(str) || /* more data to read */
-                       strpbrk(str, "+-")       /* signed hexes */
-                       ) {
+                       l != (int)strlen(str)) {
                return LDNS_STATUS_INVALID_EUI48;
        } else {
                bytes[0] = a;
@@ -1388,9 +1386,7 @@ ldns_str2rdf_eui64(ldns_rdf **rd, const char *str)
 
        if (sscanf(str, "%2x-%2x-%2x-%2x-%2x-%2x-%2x-%2x%n",
                        &a, &b, &c, &d, &e, &f, &g, &h, &l) != 8 ||
-                       l != (int)strlen(str) || /* more data to read */
-                       strpbrk(str, "+-")       /* signed hexes */
-                       ) {
+                       l != (int)strlen(str)) {
                return LDNS_STATUS_INVALID_EUI64;
        } else {
                bytes[0] = a;