diff options
author | Toomas Soome <tsoome@me.com> | 2016-10-01 01:48:45 +0300 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-10-07 09:29:48 -0700 |
commit | 472d57724271fcaa87b37d98016e1a239f0b6e84 (patch) | |
tree | 32ae5ce1191a31f1a28aba6c5cb04ad301c17f68 /usr/src | |
parent | b85b7e0b09678b7e318428f159109a868355dd38 (diff) | |
download | illumos-joyent-472d57724271fcaa87b37d98016e1a239f0b6e84.tar.gz |
7440 loader cd9660_open should check for padding
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Jörg Schilling <Joerg.Schilling@fokus.fraunhofer.de>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/lib/libstand/cd9660.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/boot/lib/libstand/cd9660.c b/usr/src/boot/lib/libstand/cd9660.c index 8f9db3fa71..e03f56eef4 100644 --- a/usr/src/boot/lib/libstand/cd9660.c +++ b/usr/src/boot/lib/libstand/cd9660.c @@ -353,6 +353,12 @@ cd9660_open(const char *path, struct open_file *f) dp = (struct iso_directory_record *) ((char *) dp + isonum_711(dp->length)); + /* If the new block has zero length, it is padding. */ + if (isonum_711(dp->length) == 0) { + /* Skip to next block, if any. */ + off = boff * ISO_DEFAULT_BLOCK_SIZE; + continue; + } off += isonum_711(dp->length); } if (off >= dsize) { |