Status: New
Owner:
andreas....@googlemail.com
Labels: Type-Defect Priority-Medium
New issue 490 by
andreas....@googlemail.com: ECKey.hashCode can trigger
ArrayIndexOutOfBoundsException
http://code.google.com/p/bitcoinj/issues/detail?id=490
Consider this key:
base58
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU
privkey
0000000000000000000000000000000000000000000000000000000000000000
Its pubkey is only one byte long and thus triggers
ArrayIndexOutOfBoundsException in the hashCode implementation. Try running
this:
new
DumpedPrivateKey(NetworkParameters.prodNet(), "5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU").getKey().hashCode();
Granted, this is a very made up case. Anyhow, I wonder if perhaps there is
other keys that would fail because they are maybe just 10 bytes shorter
than "normal".
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings