Skip to content

Commit 48bc987

Browse files
committed
Avoid negative length additions to incremental hash.
1 parent 38a65bf commit 48bc987

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/codec/digest/MurmurHash3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ public final void start(final int seed) {
10151015
* @param length The length of array
10161016
*/
10171017
public final void add(final byte[] data, final int offset, final int length) {
1018-
if (length == 0) {
1018+
if (length <= 0) {
10191019
// Nothing to add
10201020
return;
10211021
}

0 commit comments

Comments
 (0)