Skip to content

Commit ce27e4a

Browse files
Update testcondition.cpp
1 parent 87ac6b3 commit ce27e4a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/testcondition.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5849,6 +5849,19 @@ class TestCondition : public TestFixture {
58495849
" if (f < 10.0) {}\n"
58505850
"}\n");
58515851
ASSERT_EQUALS("", errout_str());
5852+
5853+
check("void f(char* s, const char* p) {\n" // #14070
5854+
" strcpy(s, p);\n"
5855+
"}\n"
5856+
"void g() {\n"
5857+
" char s1[10] = \"\";\n"
5858+
" char s2[10] = \"\";\n"
5859+
" f(s1, \"123\");\n"
5860+
" f(s2, \"1234\");\n"
5861+
" if (strlen(s1) > 0) {}\n"
5862+
" if (strlen(s2) > 0) {}\n"
5863+
"}\n");
5864+
ASSERT_EQUALS("", errout_str());
58525865
}
58535866

58545867
void checkInvalidTestForOverflow() {

0 commit comments

Comments
 (0)