aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-02-03 07:04:15 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-02-03 07:04:15 -0800
commit2bf5169f6440375c677e6ae3d3e3de6976becce1 (patch)
tree6de4a90f4e07ea909f4ebf8717391baa774da2cb /src/core/support
parentac1ac3ab3db628f7643532b515f62d113dcb9700 (diff)
Prevent infinite loop
Diffstat (limited to 'src/core/support')
-rw-r--r--src/core/support/wrap_memcpy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/support/wrap_memcpy.c b/src/core/support/wrap_memcpy.c
index ac30668ec1..15c289f7b8 100644
--- a/src/core/support/wrap_memcpy.c
+++ b/src/core/support/wrap_memcpy.c
@@ -42,9 +42,12 @@
#ifdef __linux__
#ifdef __x86_64__
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
-#endif
-
void *__wrap_memcpy(void *destination, const void *source, size_t num) {
return memcpy(destination, source, num);
}
+#else /* !__x86_64__ */
+void *__wrap_memcpy(void *destination, const void *source, size_t num) {
+ return memmove(destination, source, num);
+}
+#endif
#endif