diff options
| author | Roy Marples <roy@marples.name> | 2008-08-08 11:31:19 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-08-08 11:31:19 +0000 |
| commit | 5248f6ac08646ff73a813a5599bf18acf6937faf (patch) | |
| tree | c09e84400fd44a67eaf4c6f67ffc741f3f417e05 /dhcp.c | |
| parent | be3c2740b76e1e59fa46ce0152c6c6eda1525917 (diff) | |
| download | dhcpcd-5248f6ac08646ff73a813a5599bf18acf6937faf.tar.xz | |
Skip the trailing . if it exists on the FQDN.
Diffstat (limited to 'dhcp.c')
| -rw-r--r-- | dhcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -712,8 +712,11 @@ encode_rfc1035(const char *src, uint8_t *dst, size_t len) if (*c == '\0') break; if (*c == '.') { + /* Skip the trailing . */ + if (c == src + len - 1) + break; *lp = p - lp - 1; - if (*lp == 0) + if (*lp == '\0') return p - dst; lp = p++; } else |
