diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -175,6 +175,8 @@ /* 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 @@ /* Inserting component */ wlen = isonum_711(p->h.length) - 5; inbuf = (char *)p + 5; + if (wlen < 0) + wlen = ana->maxlen + 1; break; default: