Commit 5fd9ea7
committed
fix: avoid slice out of bounds index when server error body is <1024
Addresses the following panic:
2026/01/21 17:07:16 INFO ping...
panic: runtime error: slice bounds out of range [:1024] with capacity 512
goroutine 1 [running]:
main.ping(0xc000118e10, {0xc00001c017?, 0x9b69e0?}, {0xc00001e017, 0x4})
github.com/cofide/cofide-demos/workloads/ping-pong-mesh/ping-pong-mesh-client/main.go:72 +0x34c
main.run(0xc00007c2e0)
github.com/cofide/cofide-demos/workloads/ping-pong-mesh/ping-pong-mesh-client/main.go:47 +0xcd
main.main()
github.com/cofide/cofide-demos/workloads/ping-pong-mesh/ping-pong-mesh-client/main.go:15 +0x181 parent 9c8c0b7 commit 5fd9ea7
3 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| |||
0 commit comments