Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~/P/snippets $ cat > oob.cpp
- #include <iostream>
- int main() {
- std::cout << "Hello, world!"[1000];
- }
- ~/P/snippets $ clang++ -fsanitize=undefined -o oob oob.cpp
- ~/P/snippets $ ./oob
- oob.cpp:3:18: runtime error: index 1000 out of bounds for type 'const char [14]'
- 8⏎
- ~/P/snippets $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement