chiark / gitweb /
cdrom_id: Fix uninitialized buffers
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Apr 2010 13:25:48 +0000 (15:25 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Tue, 13 Apr 2010 13:25:48 +0000 (15:25 +0200)
commit2b861dc92757b9a3214c2b8e9d8b1c3f3c162391
tree4b640034523c51158cccbd26d68b1aa2004a8d31
parenta89d342dfb45b54e29381af9dbc495bbb2b057af
cdrom_id: Fix uninitialized buffers

Commit 5c6954f is actually a no-op, since static variables are already zero'ed
by default anyway (but we keep it for clarity). The real difference was that a
build with -O0 wor while a build with -O2 didn't.

Turns out that some ioctls do not actually touch the result buffer in some
cases, so we need to zero the result buffers to avoid interpreting random da as
CD properties.

https://launchpad.net/bugs/559723
https://launchpad.net/bugs/561585
extras/cdrom_id/cdrom_id.c