diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
commit | 741c13ecc20fb35b836ad690aeecd402f002d654 (patch) | |
tree | 60a1694bec5a44d15456acc880cb2f91619f66aa /test/Analysis/security-syntax-checks.m | |
parent | b3a51061b1b9c4add078237850649f7c9efb13ab (diff) | |
download | FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.zip FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.tar.gz |
Update clang to r89205.
Diffstat (limited to 'test/Analysis/security-syntax-checks.m')
-rw-r--r-- | test/Analysis/security-syntax-checks.m | 7 |
1 files changed, 7 insertions, 0 deletions
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().}} +} + // <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges Were // Dropped Successfully typedef unsigned int __uint32_t; |