Repository: firebase/firebase-ios-sdk (language: cpp)

Issue:
FPRTruncatedURLString crash issue
### Description

Recently, due to some invalid URL data passed from our server, our iOS projects received a lot of crash report on Firebase related library.

eg.
```
Fatal Exception: NSRangeException
*** -[__NSCFString substringToIndex:]: Index 9223372036854775807 out of bounds; string length 2269
```

> Note: 9223372036854775807 = 0x7FFFFFFFFFFFFFFF = NSNotFound

<img width="586" alt="image" src="https://github.com/firebase/firebase-ios-sdk/assets/43724855/03cfbdaa-645e-4e71-880f-f9bfe9f58af8">


### Reproducing the issue

Not yet.

### Firebase SDK Version

10.25.0

### Xcode Version

15.3

### Installation Method

Swift Package Manager

### Firebase Product(s)

Performance

### Targeted Platforms

iOS

### Relevant Log Output

_No response_

### If using Swift Package Manager, the project's Package.resolved

<!--- Look below for instructions on how to share your Package.resolved. --->

<details>
<summary>Expand <code>Package.resolved</code> snippet</summary>
<br>

```json

    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk.git",
      "state" : {
        "revision" : "97940381e57703c07f31a8058d8f39ec53b7c272",
        "version" : "10.25.0"
      }
    },
```

</details>


### If using CocoaPods, the project's Podfile.lock

<!--- Look below for instructions on how to share your Podfile.lock. --->

<details>
<summary>Expand <code>Podfile.lock</code> snippet</summary>
<br>

```yml

Replace this line with the contents of your Podfile.lock!

```

</details>



Discussion / hints:

Fix patch:
diff --git a/FirebasePerformance/Sources/FPRDataUtils.m b/FirebasePerformance/Sources/FPRDataUtils.m
index fe3a7cf13ed..23d6bf946d2 100644
--- a/FirebasePerformance/Sources/FPRDataUtils.m
+++ b/FirebasePerformance/Sources/FPRDataUtils.m
@@ -116,9 +116,10 @@
     if (![pathSeparator isEqual:truncationCharacter]) {
       NSRange rangeOfTruncation = [truncatedURLString rangeOfString:pathSeparator
                                                             options:NSBackwardsSearch];
-      truncatedURLString = [URLString substringToIndex:rangeOfTruncation.location];
+      if (rangeOfTruncation.location != NSNotFound) {
+        truncatedURLString = [URLString substringToIndex:rangeOfTruncation.location];
+      }
     }
-
     FPRLogWarning(kFPRClientNameTruncated, @"URL exceeds %d characters. Truncated url: %@",
                   kFPRMaxURLLength, truncatedURLString);
   }


Test patch: