From: Martin Pitt Date: Tue, 13 Apr 2010 13:25:48 +0000 (+0200) Subject: cdrom_id: Fix uninitialized buffers X-Git-Tag: 174~555 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2b861dc92757b9a3214c2b8e9d8b1c3f3c162391;hp=2b861dc92757b9a3214c2b8e9d8b1c3f3c162391 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 ---