Ver código fonte

Fix potential strlen crash on NULL betaToken (#6083)

* Fix potential strlen crash on NULL betaToken

* Add CHANGELOG

* restart CI
Morgan Chen 5 anos atrás
pai
commit
2a6dee09b1

+ 3 - 0
Crashlytics/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v4.3.1
+- [fixed] Fixed a segmentation fault that could occur when writing crash contexts to disk (#6048).
+
 # v4.3.0
 
 - [changed] Add dispatch_once for opening sdk log file. (#5904)

+ 1 - 0
Crashlytics/Crashlytics/Components/FIRCLSContext.m

@@ -72,6 +72,7 @@ FIRCLSContextInitData FIRCLSContextBuildInitData(FIRCLSInternalReport* report,
   initData.maxErrorLogSize = [settings errorLogBufferSize];
   initData.maxLogSize = [settings logBufferSize];
   initData.maxKeyValues = [settings maxCustomKeys];
+  initData.betaToken = "";
 
   // If this is set, then we could attempt to do a synchronous submission for certain kinds of
   // events (exceptions). This is a very cool feature, but adds complexity to the backend. For now,