We have checked the Windows 8 Driver Samples pack with our analyzer PVS-Studio and found various bugs in its samples. There is nothing horrible about it - bugs can be found everywhere, so the title of this article may sound a bit high-flown. But these particular errors may be really dangerous, as it is a usual practice for developers to use demo samples as a basis for their own projects or borrow code fragments from them.
PVS-Studio 5.00: support of Embarcadero C++Builder, Windows Store and Windows Phone 8 applications in Visual Studio, and several hundreds of diagnostic rules