-
CVSS Score
-| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| array-macro | rust | >= 2.1.0, < 2.1.2 | 2.1.2 |
The vulnerability stemmed from dual use of $count in:
Before the patch, both positions would re-evaluate the $count expression. The commit fixed this by introducing a __Capacity struct to capture N once via vec.0.capacity.get(), ensuring single evaluation. The vulnerable code path is clearly the macro's loop condition logic prior to this fix, as confirmed by the patch changing 'while vec.0.len < $count' to use the capacity field.