-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
We were using the 1.4.1 version of this library and decoding a null string returned an empty array. But after upgrading to the 1.7.0 version it throws a NullReferenceException.
With git bisect I found that the bug was introduced in the commit 480cabe.
The bug is in the long[] Hashids.GetNumbersFrom(string hash) method. If hash is null, the variable result will be an empty array, which is expected but in the next line of GetNumbersFrom it uses the Length property of hash, which is null and the NullReferenceException is thrown.
After creating the issue I'll create a PR with the unit tests and the fix.
Metadata
Metadata
Assignees
Labels
No labels