abtom87 commented on code in PR #49813:
URL: https://github.com/apache/arrow/pull/49813#discussion_r3285743124
##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -2829,8 +2789,31 @@ const char* to_hex_binary(int64_t context, const char*
text, int32_t text_len,
return "";
}
- auto ret =
- reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, text_len *
2 + 1));
+ if (ARROW_PREDICT_FALSE(text_len < 0)) {
+ gdv_fn_context_set_error_msg(context, "Text length invalid(negative).");
Review Comment:
@kou nitpicking, but ok, corrected. I have done all the changes, this PR
review has been dragging for weeks now. I have fixed these comments, truly hope
this was the last iteration of reviews. ASAN tests should pass now as well.
--
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]