]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Use the standard abort() function to terminate the program if there's
authorTim Kientzle <kientzle@gmail.com>
Thu, 19 Nov 2009 07:18:09 +0000 (02:18 -0500)
committerTim Kientzle <kientzle@gmail.com>
Thu, 19 Nov 2009 07:18:09 +0000 (02:18 -0500)
a fatal API violation by a libarchive client.

SVN-Revision: 1675

libarchive/archive_check_magic.c

index 1d4c3a6e3f843df619462a759181b9a6278a5fd0..3bc095c812f9282e773956a835bb77d39b2332d9 100644 (file)
@@ -69,8 +69,7 @@ diediedie(void)
        /* Cause a breakpoint exception  */
        DebugBreak();
 #endif
-       *(char *)0 = 1; /* Deliberately segfault and force a coredump. */
-       _exit(1);       /* If that didn't work, just exit with an error. */
+       abort();        /* Terminate the program abnormally. */
 }
 
 static const char *