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
13 changes: 5 additions & 8 deletions app/src/util_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1882,18 +1882,15 @@ bool LogException(JNIEnv* env, LogLevel log_level, const char* log_fmt, ...) {
}
if (message) {
std::string message_str = JniStringToString(env, message);
if (log_fmt == nullptr) {
LogMessage(log_level, "%s", message_str.c_str());
} else {
static char buf[512];
if (log_fmt != nullptr) {
char buf[512] = {0};
va_list list;
va_start(list, log_fmt);
vsnprintf(buf, sizeof(buf) - 1, log_fmt, list);
vsnprintf(buf, sizeof(buf), log_fmt, list);
va_end(list);
strncat(buf, ": ", sizeof(buf) - 1);
strncat(buf, message_str.c_str(), sizeof(buf) - 1);
LogMessage(log_level, "%s", buf);
message_str = std::string(buf) + ": " + message_str;
}
LogMessage(log_level, "%s", message_str.c_str());
}
env->DeleteLocalRef(exception);
return true;
Expand Down
5 changes: 5 additions & 0 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,11 @@ workflow use only during the development of your app, not for publicly shipping
code.

## Release Notes
### Upcoming
- Changes
- General (Android): Fixed a potential buffer overflow in `LogException` when
formatting long JNI exception messages.

### 14.1.0
- Changes
- General (Android): Update to Firebase Android BoM version 35.1.0.
Expand Down
Loading