mirror of
https://github.com/reactos/CMake.git
synced 2024-12-05 10:16:50 +00:00
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:
parent
87fde60563
commit
b9c41813d2
@ -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. */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user