jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1593554 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
Date Fri, 09 May 2014 14:53:00 GMT
Author: jukka
Date: Fri May  9 14:52:59 2014
New Revision: 1593554

URL: http://svn.apache.org/r1593554
Log:
OAK-1810: Incorrect TarMK graph metadata validation

Use correct size limit

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java?rev=1593554&r1=1593553&r2=1593554&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
Fri May  9 14:52:59 2014
@@ -439,7 +439,7 @@ class TarReader {
             return null; // magic byte mismatch
         }
 
-        if (count < 0 || bytes < count * 24 + 16 || BLOCK_SIZE + bytes > pos) {
+        if (count < 0 || bytes < count * 16 + 16 || BLOCK_SIZE + bytes > pos) {
             log.warn("Invalid graph metadata in tar file {}", file);
             return null; // impossible uuid and/or byte counts
         }



Mime
View raw message