abtom87 commented on code in PR #49813:
URL: https://github.com/apache/arrow/pull/49813#discussion_r3282894857
##########
cpp/src/gandiva/gdv_function_stubs_test.cc:
##########
@@ -1127,6 +1190,15 @@ TEST(TestGdvFnStubs, TestTranslate) {
result = translate_utf8_utf8_utf8(ctx_ptr, "987654321", 9, "123456789", 9,
"0123456789",
10, &out_len);
EXPECT_EQ(expected, std::string(result, out_len));
+
+ int32_t bad_in_len = std::numeric_limits<int32_t>::max() / 4 + 1;
+ out_len = -1;
+ result = translate_utf8_utf8_utf8(ctx_ptr, "\\x80BCDE", bad_in_len, "B", 1,
"C", 1,
+ &out_len);
Review Comment:
@kou passed a char array with first value as 0x80, which should now trigger
the failure path.
--
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]