amorynan commented on code in PR #49553: URL: https://github.com/apache/doris/pull/49553#discussion_r2015685681
########## be/src/vec/data_types/serde/data_type_struct_serde.cpp: ########## @@ -157,7 +157,8 @@ Status DataTypeStructSerDe::deserialize_one_cell_from_json(IColumn& column, Slic } Slice next(slice.data + start_pos, idx - start_pos); next.trim_prefix(); - if (field_pos > elem_size) { + // field_pos should always less than elem_size, if not, we should return error + if (field_pos >= elem_size) { Review Comment: less than means `field_pos < elem_size` which is right . equal we should return err, otherwise serders[field_pos] would make crash -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org