reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char *argv[]) {
  int *null_ptr = 0;
  printf("Hello, fault!\n");
  u_int32_t val = (arc4random() & 0x0f);
  printf("val=%u\n", val);
  if (val == 0x07) // Lucky 7 :-)
    printf("Now segfault %d\n", *null_ptr);
  else
    printf("Better luck next time!\n");
}