aboutsummaryrefslogtreecommitdiff
path: root/share/security/patches/SA-14:20/rtsold.patch
blob: 59ad8ec194a4bd9f805ccb31f40388f906ae14d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: usr.sbin/rtsold/rtsol.c
===================================================================
--- usr.sbin/rtsold/rtsol.c.orig
+++ usr.sbin/rtsold/rtsol.c
@@ -933,7 +933,8 @@
 	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);