Commit Diff
Diff:
98303f73516afe6007b0b1934e3ec1be1d586da3
35d93ac7821b8fb39001143f33eea2fdadf17e18
Commit:
35d93ac7821b8fb39001143f33eea2fdadf17e18
Tree:
f231505a85241b954408b6ce773cc790d6283d02
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Sun Apr 13 12:06:51 2014 UTC
Message:
* deraadt would say "learn C", and I really should! * confusion around pointers tested on FreeBSD 10 in production
blob - 55da17fbf6f53330d1f1b609655b38726ec01b7f
blob + 29246aa401ac3a98f182cf836ec707c2dfb185b5
--- parse.y
+++ parse.y
@@ -1286,10 +1286,10 @@ fill_cname(char *name, char *type, int myttl, char *ho
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1346,10 +1346,10 @@ fill_ptr(char *name, char *type, int myttl, char *host
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1411,10 +1411,10 @@ fill_txt(char *name, char *type, int myttl, char *msg)
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1459,10 +1459,10 @@ fill_srv(char *name, char *type, int myttl, int priori
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1531,10 +1531,10 @@ fill_mx(char *name, char *type, int myttl, int priorit
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1595,10 +1595,10 @@ fill_balance(char *name, char *type, int myttl, char *
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1660,10 +1660,10 @@ fill_a(char *name, char *type, int myttl, char *a)
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1723,10 +1723,10 @@ fill_aaaa(char *name, char *type, int myttl, char *aaa
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1793,10 +1793,10 @@ fill_ns(char *name, char *type, int myttl, char *names
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
@@ -1866,10 +1866,10 @@ fill_soa(char *name, char *type, int myttl, char *auth
}
#ifdef __linux__
- strncpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strncpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
sdomain.zonename[DNS_MAXNAME] = '\0';
#else
- strlcpy((char *)sdomain.zonename, (char *)&name, DNS_MAXNAME + 1);
+ strlcpy((char *)sdomain.zonename, (char *)name, DNS_MAXNAME + 1);
#endif
memcpy(sdomain.zone, converted_name, converted_namelen);
sdomain.zonelen = converted_namelen;
repomaster@centroid.eu