aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/__strlcat_chk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/bionic/__strlcat_chk.cpp')
-rw-r--r--libc/bionic/__strlcat_chk.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/libc/bionic/__strlcat_chk.cpp b/libc/bionic/__strlcat_chk.cpp
index 783dd8494..f583154ae 100644
--- a/libc/bionic/__strlcat_chk.cpp
+++ b/libc/bionic/__strlcat_chk.cpp
@@ -42,12 +42,11 @@
* This strlcat check is called if _FORTIFY_SOURCE is defined and
* greater than 0.
*/
-extern "C" size_t __strlcat_chk(char *dest, const char *src,
- size_t supplied_size, size_t dest_len_from_compiler)
-{
- if (__predict_false(supplied_size > dest_len_from_compiler)) {
- __fortify_chk_fail("strlcat prevented write past end of buffer", 0);
- }
+extern "C" size_t __strlcat_chk(char* dest, const char* src,
+ size_t supplied_size, size_t dest_len_from_compiler) {
+ if (__predict_false(supplied_size > dest_len_from_compiler)) {
+ __fortify_chk_fail("strlcat: prevented write past end of buffer", 0);
+ }
- return strlcat(dest, src, supplied_size);
+ return strlcat(dest, src, supplied_size);
}