]> err.no Git - systemd/commit
cdrom_id: Fix uninitialized variables
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Apr 2010 08:49:24 +0000 (10:49 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Apr 2010 08:49:24 +0000 (10:49 +0200)
commit816e6bf0fb0849d03696a4b4ec2334e35e819425
tree7b0d6e5b1b8009493df49f918e43411ed50fe3c2
parent1f084fe5811ce251d516a8022f8c7c27d0ef1f53
cdrom_id: Fix uninitialized variables

In cases where cdrom_id does not go through the entire code path and one of the
probing functions returns -1 or exits early, the remaining variables were never
initialized. This caused effects like "phantom" audio CDs on empty drives, or
bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528.

Initialize the variables right away to avoid that.

Bug-Ubuntu: https://launchpad.net/bugs/559723
extras/cdrom_id/cdrom_id.c