Loading...
--- Libc/Libc-1725.40.4/secure/memcpy_chk.c
+++ Libc/Libc-498/secure/memcpy_chk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2007 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
@@ -23,19 +23,14 @@
#include <stdlib.h>
#include <string.h>
-#include "secure.h"
+
+extern void __chk_fail (void) __attribute__((__noreturn__));
void *
__memcpy_chk (void *dest, const void *src, size_t len, size_t dstlen)
{
if (__builtin_expect (dstlen < len, 0))
- __chk_fail_overflow ();
-
- /* On OS X, memcpy has supported overlapping buffers for many years.
- * While technically, this will catch buggy code, we should not abort.
- * if (__builtin_expect (__chk_assert_no_overlap != 0, 1))
- * __chk_overlap(dest, len, src, len);
- */
+ __chk_fail ();
return memcpy (dest, src, len);
}