Commit eb9bb02
authored
fix(v3/ios): empty string from a bound method no longer crashes the app (#5626)
The iOS asset response writer guarded the body pointer with 'buf != nil'
instead of its length. A bound Go method returning "" produces a zero-length
(but non-nil) response body, so '&buf[0]' panicked with index-out-of-range and
aborted the Go runtime (SIGABRT). Guard on len(buf) instead — matching the
darwin/desktop writers — and pass a nil pointer + length 0 for an empty body
(a valid empty NSData on the C side).
Reproduced and verified fixed on the iOS simulator.1 parent 98efc33 commit eb9bb02
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
0 commit comments