Commit e553a3d
Fix potential crash in FileReader.readAsArrayBuffer on malformed data URL
When reading as ArrayBuffer, the code splits the data URL on ","
and accesses index [1] without a fallback. If the native module
returns a string without a comma, this results in undefined being
passed to toByteArray(), causing a crash.
Added nullish coalescing to default to an empty string.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8bac1df commit e553a3d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
0 commit comments