anthonylouisbsb commented on code in PR #13682:
URL: https://github.com/apache/arrow/pull/13682#discussion_r933313824
##########
cpp/src/gandiva/precompiled/time.cc:
##########
@@ -261,8 +261,22 @@ static const int WEEK_LEN[] = {6, 6, 7, 9, 8, 6, 8};
const auto& presentDate = extractDow_timestamp(tp.MillisSinceEpoch());
\
\
int dateSearch = 0;
\
+
\
+ /* To skip entries out of patterns range */
\
+ if (in_len > 9) {
\
+ gdv_fn_context_set_error_msg(context, "The weekday in this entry is
invalid"); \
+ return 0;
\
+ }
\
+
\
+ char* up = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context,
in_len)); \
Review Comment:
Add a check to see if the malloc operation worked fine
--
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]