Skip to content

Commit 6c55f9c

Browse files
Add test for #10133 (#3675)
1 parent 303b85c commit 6c55f9c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/testbufferoverrun.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4943,6 +4943,14 @@ class TestBufferOverrun : public TestFixture {
49434943
" return p[4];\n"
49444944
"}\n");
49454945
ASSERT_EQUALS("", errout.str());
4946+
4947+
check("struct S { uint8_t padding[500]; };\n" // #10133
4948+
"S s = { 0 };\n"
4949+
"uint8_t f() {\n"
4950+
" uint8_t* p = (uint8_t*)&s;\n"
4951+
" return p[10];\n"
4952+
"}\n");
4953+
ASSERT_EQUALS("", errout.str());
49464954
}
49474955
};
49484956

0 commit comments

Comments
 (0)