diff options
-rw-r--r-- | extras/cdrom_id/cdrom_id.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c index 0e0a463d94..e0cbe9e713 100644 --- a/extras/cdrom_id/cdrom_id.c +++ b/extras/cdrom_id/cdrom_id.c @@ -469,6 +469,8 @@ static int cd_media_toc(int fd) info("READ TOC: len: %d\n", len); if (len > sizeof(toc)) return -1; + if (len < 8) + return -1; /* check if we have a data track */ info("ctl %02x (0x04 is data/audio)\n", header[5]); |