summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-10 12:58:19 (GMT)
committerBrad King <brad.king@kitware.com>2010-09-10 13:00:48 (GMT)
commitb9c41813d29be3a520d196ce3abfb533fb5c0dbb (patch)
tree89d1d816373b094e9bf91fc168fdfa4ed338c039 /Utilities
parent87fde60563a3915234b33192d7f20b2af0c37206 (diff)
downloadCMake-b9c41813d29be3a520d196ce3abfb533fb5c0dbb.zip
CMake-b9c41813d29be3a520d196ce3abfb533fb5c0dbb.tar.gz
CMake-b9c41813d29be3a520d196ce3abfb533fb5c0dbb.tar.bz2
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.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_check_magic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_check_magic.c b/Utilities/cmlibarchive/libarchive/archive_check_magic.c
index a9177d7..e9dbe51 100644
--- a/Utilities/cmlibarchive/libarchive/archive_check_magic.c
+++ b/Utilities/cmlibarchive/libarchive/archive_check_magic.c
@@ -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. */
}