Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ const char* shim::strchr_chk(const char* __s, int __ch, size_t __n) {
return strchr(__s, __ch);
}

const char* shim::strrchr_chk(const char* __s, int __ch, size_t __n) {
return strrchr(__s, __ch);
}

#ifndef __LP64__
int shim::ftruncate(int fd, bionic::off_t len) {
return ::ftruncate(fd, (::off_t) len);
Expand Down Expand Up @@ -843,6 +847,7 @@ void shim::add_string_shimmed_symbols(std::vector<shim::shimmed_symbol> &list) {
{"strlen", ::strlen},
{"__strlen_chk", strlen_chk},
{"__strchr_chk", strchr_chk},
{"__strrchr_chk", strrchr_chk},
{"strcmp", ::strcmp},
{"strcpy", ::strcpy},
{"__strcpy_chk", __strcpy_chk},
Expand Down
1 change: 1 addition & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ namespace shim {

size_t strlen_chk(const char *str, size_t max_len);
const char* strchr_chk(const char* __s, int __ch, size_t __n);
const char* strrchr_chk(const char* __s, int __ch, size_t __n);

#ifndef __LP64__
/* Bionic uses a 32-bit off_t; this doesn't match up on Darwin so let's
Expand Down