From 82f9107a0a0d057212b4e62ff5b3772845b4ab24 Mon Sep 17 00:00:00 2001 From: Nick Bray Date: Wed, 10 Oct 2018 14:22:46 -0700 Subject: Whitelist variable-length arrays for gatekeeper. This will allow -Wvla to be turned on for the rest of the code base. In the future the use of VLAs in gatekeeper should be eliminated. Bug: 114232578 Change-Id: If5027563dea26039fa06c573ccf93ed17394c748 --- rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rules.mk b/rules.mk index ee97cab..fa73cab 100644 --- a/rules.mk +++ b/rules.mk @@ -36,6 +36,12 @@ MODULE_INCLUDES += \ $(LOCAL_DIR) \ $(TRUSTY_TOP)/hardware/libhardware/include +# Gatekeeper uses variable-length arrays to concatinate a salt with a password. +# The code should be changed to either use malloc or explicitly pass each piece +# of data to the hash function. +# TODO(ncbray): remove the VLA and turn the warning back on. +MODULE_COMPILEFLAGS := -Wno-vla + include $(LOCAL_DIR)/$(IPC)/rules.mk include make/module.mk -- cgit v1.2.3