OSDN Git Service
(root)
/
android-x86
/
bionic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ad2147
)
further cleanup memcpy fortify implementation
author
Nick Kralevich
<nnk@google.com>
Sun, 5 Oct 2014 13:52:24 +0000
(06:52 -0700)
committer
Elliott Hughes
<enh@google.com>
Mon, 6 Oct 2014 23:18:32 +0000
(16:18 -0700)
Bug:
17784968
(cherry picked from commit
b84f667e9312611536a564700daea11c12b6fcfa
)
Change-Id: I68fc2cc0a1ee7f0887edf3681eb83ef678de1383
libc/include/string.h
patch
|
blob
|
history
diff --git
a/libc/include/string.h
b/libc/include/string.h
index
6384d57
..
3d08371
100644
(file)
--- a/
libc/include/string.h
+++ b/
libc/include/string.h
@@
-96,11
+96,7
@@
extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale
__BIONIC_FORTIFY_INLINE
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
- char *d = (char *) dest;
- const char *s = (const char *) src;
- size_t d_len = __bos0(d);
-
- return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
+ return __builtin___memcpy_chk(dest, src, copy_amount, __bos0(dest));
}
__BIONIC_FORTIFY_INLINE