From 741c13ecc20fb35b836ad690aeecd402f002d654 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Wed, 18 Nov 2009 14:59:57 +0000 Subject: Update clang to r89205. --- test/Analysis/security-syntax-checks.m | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/Analysis/security-syntax-checks.m') diff --git a/test/Analysis/security-syntax-checks.m b/test/Analysis/security-syntax-checks.m index ebd7d17..bcdc65e 100644 --- a/test/Analysis/security-syntax-checks.m +++ b/test/Analysis/security-syntax-checks.m @@ -30,6 +30,13 @@ void test_gets() { gets(buff); // expected-warning{{Call to function 'gets' is extremely insecure as it can always result in a buffer overflow}} } +int getpw(unsigned int uid, char *buf); + +void test_getpw() { + char buff[1024]; + getpw(2, buff); // expected-warning{{The getpw() function is dangerous as it may overflow the provided buffer. It is obsoleted by getpwuid().}} +} + // CWE-273: Failure to Check Whether Privileges Were // Dropped Successfully typedef unsigned int __uint32_t; -- cgit v1.1