libarchive: Fix purposeful crash

Dereferencing a 0-pointer is undefined behavior, not a deterministic
crash.  Use a 1-pointer instead.  This also avoids a warning by Clang
about the undefined behavior.
This commit is contained in:
Brad King 2010-09-10 08:58:19 -04:00
parent 87fde60563
commit b9c41813d2

View File

@ -69,7 +69,7 @@ diediedie(void)
/* Cause a breakpoint exception */
DebugBreak();
#endif
*(char *)0 = 1; /* Deliberately segfault and force a coredump. */
*(char *)1 = 1; /* Deliberately segfault and force a coredump. */
_exit(1); /* If that didn't work, just exit with an error. */
}