On 32-bit architectures (e.g. ARM7), int is 32 bits wide. Casting a uint32 hash value to int can overflow, producing a negative number. Go's modulo operator preserves the sign, so the channel index can become -1, causing a panic. Perform the modulo in uint32 space before indexing to ensure the result is always non-negative. Fixes #413tags/v2.2.5^2^2
|
||
| 38 | 38 |
|
| 39 | 39 |
|
| 40 | 40 |
|
| 41 |
|
|
| 41 |
|
|
| 42 | 42 |
|
| 43 | 43 |
|
| 44 | 44 |
|