We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5eee684 commit 215f059Copy full SHA for 215f059
cpp/src/parquet/decoder.cc
@@ -776,8 +776,8 @@ class PlainByteArrayDecoder : public PlainDecoder<ByteArrayType> {
776
// This precondition follows from those two checks.
777
DCHECK_GE(len_, 4);
778
auto value_len = SafeLoadAs<int32_t>(data_);
779
- // `value_len <= estimated_data_length` is stricter than `value_len <= len_ - 4`
780
- // due to the way `estimated_data_length` is computed.
+ // This check also ensures that `value_len <= len_ - 4` due to the way
+ // `estimated_data_length` is computed.
781
if (ARROW_PREDICT_FALSE(value_len < 0 || value_len > estimated_data_length)) {
782
return Status::Invalid(
783
"Invalid or truncated PLAIN-encoded BYTE_ARRAY data");
0 commit comments