Simplify sanitize->check_array()

Fix a bug in CBDT sanitize, and redundant check in avar.
15 files changed