diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rtsold/rtsol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index c9b3d44..118206a 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -933,7 +933,8 @@ dname_labeldec(char *dst, size_t dlen, const char *src) dst_origin = dst; memset(dst, '\0', dlen); while (src && (len = (uint8_t)(*src++) & 0x3f) && - (src + len) <= src_last) { + (src + len) <= src_last && + (dst - dst_origin < (ssize_t)dlen)) { if (dst != dst_origin) *dst++ = '.'; warnmsg(LOG_DEBUG, __func__, "labellen = %zd", len); |