A Study of Potential Security and Safety Vulnerabilities in Cyber-Physical Systems