]> git.saurik.com Git - apple/libc.git/blobdiff - secure/memset_chk.c
Libc-997.1.1.tar.gz
[apple/libc.git] / secure / memset_chk.c
index ed4b2edf89692c588f5edcc4678acc2ebf8401e7..364f3a07b61cedd8eca41ba10ca0e5acee84b1ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2007-2013 Apple Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  *
 
 #include <stdlib.h>
 #include <string.h>
-
-extern void __chk_fail (void) __attribute__((__noreturn__));
+#include "secure.h"
 
 void *
 __memset_chk (void *dest, int val, size_t len, size_t dstlen)
 {
   if (__builtin_expect (dstlen < len, 0))
-    __chk_fail ();
+    __chk_fail_overflow ();
 
   return memset (dest, val, len);
 }