================
@@ -217,6 +217,66 @@ void test_strcat(void) {
strcat(x, y); //expected-warning{{Call to function 'strcat' is insecure as
it does not provide bounding of the memory buffer. Replace unbounded copy
functions with analogous functions that support length arguments such as
'strlcat'. CWE-119}}
}
+// Windows-specific string functions
+char *lstrcpyA(char *dst, const char *src);
+char *lstrcatA(char *dst, const char *src);
+
+void test_lstrcpyA(void) {
+ char dst[4];
+ char *src;
+ lstrcpyA(dst, src); // expected-warning{{Call to function 'lstrcpyA' is
insecure as it does not provide bounding of the memory buffer. Replace
unbounded copy functions with analogous functions that support length arguments
such as 'strlcpy'. CWE-119}}
----------------
benedekaibas wrote:
The test files need to be updated after applying the diagnostic changes.
https://github.com/llvm/llvm-project/pull/234582
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits