Cherry-pick security fix for skip_input_data

Avoid complete roll of r1732 as there are fixes needed in other
projects for that. Manually cherry-pick the security fix only.

bug: 135532289
Change-Id: I8237fe185b45ba5054504114eef79a265768de4e
Merged-In: Ibf05a0e54c7bc882788194862cdd94fccfba5ebf
3 files changed