Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 28594:d3990da51637
check-code: prevent use of strcpy
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 19 Mar 2016 20:18:38 -0400 |
parents | 9e3ecb6f4995 |
children | adda6dee600e |
line wrap: on
line diff
--- a/contrib/check-code.py Sat Mar 19 20:02:19 2016 -0400 +++ b/contrib/check-code.py Sat Mar 19 20:18:38 2016 -0400 @@ -359,6 +359,7 @@ (r'^#\s+\w', "use #foo, not # foo"), (r'[^\n]\Z', "no trailing newline"), (r'^\s*#import\b', "use only #include in standard C code"), + (r'strcpy\(', "don't use strcpy, use strlcpy or memcpy"), ], # warnings []