Add missing include and security check.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>