diff --git a/CHANGELOG b/CHANGELOG index b7aa3ca..31be3ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -79,6 +79,7 @@ xx/xx/2018 autofs-5.1.5 - fix a regression with map instance lookup. - fix trailing dollar sun entry expansion. - initialize struct addrinfo for getaddrinfo() calls. +- fix quoted string length calc in expandsunent(). 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/modules/parse_sun.c b/modules/parse_sun.c index bfb4c84..31c55af 100644 --- a/modules/parse_sun.c +++ b/modules/parse_sun.c @@ -213,9 +213,11 @@ int expandsunent(const char *src, char *dst, const char *key, *dst++ = *src; src++; } - if (*src && dst) { + if (*src) { len++; - *dst++ = *src++; + if (dst) + *dst++ = *src; + src++; } break;