Description: Prevent a failure on machines with no disc drive.
 In lib/driver/gnu_linux.c, scanning checklist1 and checklist2 did not end
 correctly. Use checklist1_size and checklist2_size to stop correctly at
 the end.
Author: Nicolas Boullis <nboullis@debian.org>
Applied-Upstream: 0.82, http://git.savannah.gnu.org/cgit/libcdio.git/commit/?id=2522c26ec8082be46ee4012cfac76467bb0fb350
--- a/lib/driver/gnu_linux.c
+++ b/lib/driver/gnu_linux.c
@@ -1433,7 +1433,7 @@
 
   /* Scan the system for CD-ROM drives.
   */
-  for ( i=0; strlen(checklist1[i]) > 0; ++i ) {
+  for ( i=0; i < checklist1_size; ++i ) {
     if (snprintf(drive, sizeof(drive), "/dev/%s", checklist1[i]) < 0)
       continue;
     if ( is_cdrom_linux(drive, NULL) > 0 ) {
@@ -1452,7 +1452,7 @@
   /* Scan the system for CD-ROM drives.
      Not always 100% reliable, so use the USE_MNTENT code above first.
   */
-  for ( i=0; checklist2[i].format; ++i ) {
+  for ( i=0;  i < checklist2_size; ++i ) {
     unsigned int j;
     for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) {
       if (snprintf(drive, sizeof(drive), checklist2[i].format, j) < 0)
