error message on cmd segfault.
This commit is contained in:
17
tests/test_segfault.c
Normal file
17
tests/test_segfault.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user