You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#7570: Support address-of operator on variables in getBufferSize() (#7767)
Detect address-of token in `getBufferSize()` and get the underlying
variable's corresponding buffer size.
`stringNotZeroTerminated()` also calls `getBuffersize()`, so it will
also benefit.
ASSERT_EQUALS("[test.cpp:3:3]: (warning, inconclusive) The buffer 'c' may not be null-terminated after the call to strncpy(). [terminateStrncpy]\n", errout_str());
4728
+
4729
+
check("void foo() {\n"
4730
+
" char c[6];\n"
4731
+
" strncpy(&c, \"hello\\0\", 6);\n"
4732
+
"}");
4733
+
ASSERT_EQUALS("", errout_str());
4734
+
}
4735
+
4688
4736
voidrecursive_long_time() {
4689
4737
// Just test that recursive check doesn't take long time
0 commit comments