]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - debug/chk_fail.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / debug / chk_fail.c
index 0cfca295a9fdb836e29639d613bc9cba200ae631..60814dd98933c0d78b452bbd30eb0011020cde2c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -26,9 +25,6 @@ void
 __attribute__ ((noreturn))
 __chk_fail (void)
 {
-  /* The loop is added only to keep gcc happy.  */
-  while (1)
-    __libc_message (2, "*** buffer overflow detected ***: %s terminated\n",
-                   __libc_argv[0] ?: "<unknown>");
+  __fortify_fail ("buffer overflow detected");
 }
 libc_hidden_def (__chk_fail)