Open source only makes bugs shallow if lots of people are using the software and reviewing the code. OpenSSL is a great example of code that lots of people ended up using but not reviewing that had/has many issues.
I'm not saying anything negative about open source...I'm just saying that its more complex than just having code available.