pitrou commented on code in PR #49160:
URL: https://github.com/apache/arrow/pull/49160#discussion_r2783019670
##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -841,7 +841,12 @@ const char* repeat_utf8_int32(gdv_int64 context, const
char* in, gdv_int32 in_le
*out_len = 0;
return "";
}
- *out_len = repeat_number * in_len;
+ if (ARROW_PREDICT_FALSE(
+ arrow::internal::MultiplyWithOverflow(repeat_number, in_len,
out_len))) {
+ gdv_fn_context_set_error_msg(context, "Too large output size");
Review Comment:
The error message is a bit confusing, how about "Repeats would overflow
maximum output size"?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]