error message on cmd segfault.

This commit is contained in:
LuckyLaszlo
2021-12-21 17:33:23 +01:00
parent 5a39470290
commit 54c9df31e4
2 changed files with 32 additions and 5 deletions

17
tests/test_segfault.c Normal file
View File

@@ -0,0 +1,17 @@
# include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[], char *envp[])
{
int i;
char *str;
str = NULL;
i = 0;
while (str[i])
{
write(1, &str[i], 1);
}
return (0);
}