diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp index a1f10d97a..7a2c0158e 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp @@ -99,8 +99,8 @@ ConsumeIntegralArray(JNIEnv &env, jobject self, jint max_length) { reinterpret_cast(env.GetLongField(self, gDataPtrField)); jint remainingBytes = env.GetIntField(self, gRemainingBytesField); - jint max_num_bytes = std::max( - std::min(static_cast(sizeof(T)) * max_length, remainingBytes), 0); + jint max_num_bytes = + std::min(static_cast(sizeof(T)) * max_length, remainingBytes); jsize actual_length = max_num_bytes / sizeof(T); jint actual_num_bytes = sizeof(T) * actual_length; auto array = (env.*(JniArrayType::kNewArrayFunc))(actual_length);