Add more checks for bad values to protect from corrupt files.

Change-Id: I5e282099e7c6fcc8756146fc7282eec31937af1f
1 file changed