Welcome to mirror list, hosted at ThFree Co, Russian Federation.

chk_fail.c « ssp « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1f8e42a693accf158d584d2fb058a59a4cf6999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <signal.h>
#include <string.h>
#include <unistd.h>

void
__attribute__((__noreturn__))
__chk_fail(void)
{
  char msg[] = "*** buffer overflow detected ***: terminated\n";
  write (2, msg, strlen (msg));
  raise (SIGABRT);
  _exit (127);
}