Commit 8189984
committed
Reject malformed (odd-length) hex strings
Previously, we'd attempt to decode any hex string even if it had an odd
number of input characters. Here, we check the length and return `None`
in case it's odd.
Signed-off-by: Elias Rohrer <dev@tnull.de>1 parent 7281b35 commit 8189984
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
0 commit comments