Changeset 43f7897 for core


Ignore:
Timestamp:
Apr 30, 2016 1:58:36 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
efdb296
Parents:
d8e15db
Message:

Data: Fix NPE calculating the hash of a RI of unknown sig type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/SigningPublicKey.java

    rd8e15db r43f7897  
    178178     */
    179179    public void writeTruncatedBytes(OutputStream out) throws DataFormatException, IOException {
    180         if (_type.getPubkeyLen() <= KEYSIZE_BYTES)
     180        // we don't use _type here so we can write the data even for unknown type
     181        //if (_type.getPubkeyLen() <= KEYSIZE_BYTES)
     182        if (_data == null) throw new DataFormatException("No data to write out");
     183        if (_data.length <= KEYSIZE_BYTES)
    181184            out.write(_data);
    182185        else
Note: See TracChangeset for help on using the changeset viewer.