Update db.cpp
Merge pull request #16 from sniperal44/master

Update db.cpp : fix security code issue. Thanks @sniperal44