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/03/03 14:16:12 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #12532: ARROW-15815: [C++][Parquet] Fix undefined behaviour on invalid input

pitrou commented on a change in pull request #12532:
URL: https://github.com/apache/arrow/pull/12532#discussion_r818697820



##########
File path: cpp/src/parquet/file_reader.cc
##########
@@ -146,6 +146,10 @@ ::arrow::io::ReadRange ComputeColumnChunkRange(FileMetaData* file_metadata,
 
   int64_t col_length = column_metadata->total_compressed_size();
   int64_t col_end;
+  if (col_start < 0 || col_length < 0) {
+    throw ParquetException("Invalid column metadata (corrupt file?)");

Review comment:
       I don't think that'd be useful. They are unlikely to arise of a programming error in the writer (how do you get a negative length or file offset?).




-- 
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