Skip to content

Commit ec9309d

Browse files
Fix heap-buffer overflow in FPREncodePerfSessions (#8872)
* Fix heap-buffer overflow in FPREncodePerfSessions * Update CHANGELOG.md * Update CHANGELOG.md * Attempt to add sanitizers to workflow. * Update performance.yml * Update performance.yml * Update performance.yml * Remove sanitizer check.
1 parent 4deab9c commit ec9309d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

FirebasePerformance/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Unreleased
22
* Fix a crash related to FPRSessionDetails. (#8691)
3+
* Fix heap-buffer overflow when encoding sessions. (#8849)
34

45
# Version 8.8.0
56
* Create a random number of delay for remote config fetch during app starts.
67
* Fix log spamming when Firebase Performance is disabled. (#8423, #8577)
7-
* Fix heap-heap-buffer overflow when decoding strings. (#8628)
8+
* Fix heap-buffer overflow when decoding strings. (#8628)
89

910
# Version 8.6.1
1011
* Fix the case where the event were dropped for missing a critical field in the event.

FirebasePerformance/Sources/FPRNanoPbUtils.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ static firebase_perf_v1_NetworkConnectionInfo_MobileSubtype FPRCellularNetworkTy
184184
perfSessions[perfSessionIndex].session_verbosity_count = 0;
185185
if ((session.options & FPRSessionOptionsEvents) ||
186186
(session.options & FPRSessionOptionsGauges)) {
187+
perfSessions[perfSessionIndex].session_verbosity_count = 1;
187188
perfSessions[perfSessionIndex].session_verbosity =
188189
calloc(perfSessions[perfSessionIndex].session_verbosity_count,
189190
sizeof(firebase_perf_v1_SessionVerbosity));
190191
perfSessions[perfSessionIndex].session_verbosity[0] =
191192
firebase_perf_v1_SessionVerbosity_GAUGES_AND_SYSTEM_EVENTS;
192-
perfSessions[perfSessionIndex].session_verbosity_count = 1;
193193
}
194194
perfSessionIndex++;
195195
}];

0 commit comments

Comments
 (0)