ffacs commented on code in PR #2191:
URL: https://github.com/apache/orc/pull/2191#discussion_r2047333284


##########
c++/test/TestDecompression.cc:
##########
@@ -395,6 +395,26 @@ namespace orc {
     ASSERT_TRUE(!result->Next(&ptr, &length));
   }
 
+  TEST_F(TestDecompression, testLzoOverflow) {
+    const unsigned char bad_lzo_data[] = {// Header: compressedSize = 12, 
original = false
+                                          0x18, 0x00, 0x00,
+
+                                          // LZO body: token and literal 
length extension
+                                          0x00,  // token: extended literal 
length
+                                          0xFF,  // extension byte 1
+
+                                          // Literal data: only 10 bytes far 
less than 273

Review Comment:
   > Why magic number `273`?
   
   Simply a large enough number that comes from 0x00 0xff.



-- 
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: issues-unsubscr...@orc.apache.org

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

Reply via email to