Move all xwrap to Rust

This commit is contained in:
topjohnwu committed 2022-09-15 01:17:05 -07:00
1 parent 66a7ef5615
commit c6646efe68
18 files changed
+356 -198

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ extern "C" int magisk_log_print(int prio, const char *tag, const char *fmt, ...)
}
char fmt_buf[4096];
auto len = strlcpy(fmt_buf, tag, sizeof(fmt_buf) - 1);
auto len = strscpy(fmt_buf, tag, sizeof(fmt_buf) - 1);
// Prevent format specifications in the tag
std::replace(fmt_buf, fmt_buf + len, '%', '_');
len = ssprintf(fmt_buf + len, sizeof(fmt_buf) - len - 1, ": %s", fmt) + len;