multiformats/java-multibase

Base58Btc encoded byte array or zeros causes StringIndexOutOfBoundsException

Closed this issue · 2 comments

Multibase.decode("z111111111111111111111111111111111");

throws this:

java.lang.StringIndexOutOfBoundsException: String index out of range: 33
	at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:48)
	at java.base/java.lang.String.charAt(String.java:1515)
	at io.ipfs.multibase.Base58.decode(Base58.java:68)
	at io.ipfs.multibase.Multibase.decode(Multibase.java:55)
...

@ianopolous : are you able to take this?

I can't reproduce this on current master. It seems to work fine.