mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
13 lines
236 B
C
13 lines
236 B
C
#include "syscall.h"
|
|
|
|
int main() {
|
|
const char* msg = "Attempting to crash via null dereference...\n";
|
|
sys_write(1, msg, 45);
|
|
|
|
// Null pointer dereference
|
|
volatile int* p = (int*)0;
|
|
*p = 123;
|
|
|
|
return 0;
|
|
}
|