From 7c497a2c735b695cdbedc3cfb80348bad847ba00 Mon Sep 17 00:00:00 2001 From: "R. Bernstein" Date: Tue, 30 Dec 2008 14:14:00 -0500 Subject: [PATCH] Endless loop when no CD-rom drives. Patch thanks to Adrian Reber --- lib/driver/gnu_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/driver/gnu_linux.c b/lib/driver/gnu_linux.c index 7e2f3c44..092af0d6 100644 --- a/lib/driver/gnu_linux.c +++ b/lib/driver/gnu_linux.c @@ -1448,7 +1448,7 @@ cdio_get_default_device_linux(void) /* 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)