Commit 141faae
authored
revert: keep LeftPad exact-length guard (== size), not >= size
Reverts the accepted suggestion. returns an oversized array unchanged for value.Length > size, silently handing the rust sign-server a wrong-length key instead of the 32-byte scalar the contract requires — a silent contract violation worse than the BlockCopy throw it avoids. The over-length case is unreachable anyway (secp256k1 scalars are <=32 bytes; the bug this fixes was under-length). Restores the exact-length fast path.1 parent 9c84b52 commit 141faae
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments