projects
/
oweals
/
gnunet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
nitpicks
[oweals/gnunet.git]
/
src
/
monkey
/
bug_null_pointer_exception.c
1
#include <stdio.h>
2
#include <string.h>
3
4
void crashFunction()
5
{
6
char *nullString = NULL;
7
printf("Now the program will crash!\n");
8
if (strcmp(nullString, "A string to compare with") == 0) {
9
printf("How come?! It had to crash!\n");
10
}
11
}
12
13
int main(int argc, char *argv[])
14
{
15
crashFunction();
16
return 0;
17
}