Changeset 3781b8db


Ignore:
Timestamp:
Sep 15, 2014 6:24:37 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ceab4f1
Parents:
7a450c5
Message:

sanity check

File:
1 edited

Legend:

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

    r7a450c5 r3781b8db  
    667667     */
    668668    public static void toLong(byte target[], int offset, int numBytes, long value) throws IllegalArgumentException {
    669         if (numBytes <= 0) throw new IllegalArgumentException("Invalid number of bytes");
     669        if (numBytes <= 0 || numBytes > 8) throw new IllegalArgumentException("Invalid number of bytes");
    670670        if (value < 0) throw new IllegalArgumentException("Negative value not allowed");
    671671
Note: See TracChangeset for help on using the changeset viewer.