chiark / gitweb /
cdrom_id: Don't read beyond "last track" in TOC
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 5 Oct 2010 15:56:19 +0000 (17:56 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 5 Oct 2010 15:56:19 +0000 (17:56 +0200)
commit1ebd2a5620c93ef4698485d392c19ded675412d2
treeeebf138873734e92a3ce008f1b1fabbfbf0674b7
parent678df8a461c7573bf423a39be383bc7b70d943df
cdrom_id: Don't read beyond "last track" in TOC

Read the first and last track from the TOC header, and do not go beyond that
stated number of tracks when reading the TOC. Otherwise we interpret random
data which leads to bogus tracks. (Reported on an IronKey, which reported 1
data track, and 4 audio tracks which weren't actually present.)
extras/cdrom_id/cdrom_id.c