aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/cd9660
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2026-04-01 17:14:16 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2026-04-01 17:14:48 +0000
commitd0afead876076f605c363f03d92304d1bd75be1c (patch)
tree359bc6a60198698f1a710060680ba8405c15725a /sys/fs/cd9660
parent759d8a13a3b4510b7fab4d6c32e5a8de5ab056e7 (diff)
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r--sys/fs/cd9660/cd9660_rrip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c
index 6e91f1abb9d2..9bc8ef655368 100644
--- a/sys/fs/cd9660/cd9660_rrip.c
+++ b/sys/fs/cd9660/cd9660_rrip.c
@@ -175,6 +175,8 @@ cd9660_rrip_slink(ISO_RRIP_SLINK *p, ISO_RRIP_ANALYZE *ana)
/* Inserting component */
wlen = isonum_711(pcomp->clen);
inbuf = pcomp->name;
+ if (inbuf + wlen > (char *)pcompe)
+ wlen = ana->maxlen + 1;
break;
default:
printf("RRIP with incorrect flags?");
@@ -246,6 +248,8 @@ cd9660_rrip_altname(ISO_RRIP_ALTNAME *p, ISO_RRIP_ANALYZE *ana)
/* Inserting component */
wlen = isonum_711(p->h.length) - 5;
inbuf = (char *)p + 5;
+ if (wlen < 0)
+ wlen = ana->maxlen + 1;
break;
default: