You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/08 00:03:32 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #12365: PARQUET-2119: Fix DeltaBitPackDecoder fuzzer found issue.

emkornfield commented on a change in pull request #12365:
URL: https://github.com/apache/arrow/pull/12365#discussion_r801160571



##########
File path: cpp/src/parquet/encoding.cc
##########
@@ -2181,12 +2181,14 @@ class DeltaBitPackDecoder : public DecoderImpl, virtual public TypedDecoder<DTyp
   }
 
   int GetInternal(T* buffer, int max_values) {
-    max_values = std::min(max_values, this->num_values_);
+    int total_value_count = static_cast<int>(std::min(
+        total_value_count_, static_cast<uint32_t>(std::numeric_limits<int>::max())));
+    max_values = std::min(max_values, total_value_count);
+    DCHECK_GE(max_values, 0);

Review comment:
       I think if this can result from a malformed file we should throw an exception (same in general for any checks in the parquet code per your point in the CL description.).




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org