You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crail.apache.org by GitBox <gi...@apache.org> on 2021/06/22 14:31:47 UTC

[GitHub] [incubator-crail] PepperJo commented on a change in pull request #87: Interpret DirectoryRecord entries only if valid.

PepperJo commented on a change in pull request #87:
URL: https://github.com/apache/incubator-crail/pull/87#discussion_r656280089



##########
File path: client/src/main/java/org/apache/crail/core/DirectoryRecord.java
##########
@@ -54,10 +54,12 @@ public void update(CrailBuffer buffer) {
 		int tmplimit = buffer.position() + CrailConstants.DIRECTORY_RECORD;
 		buffer.limit(tmplimit);
 		valid = buffer.getInt();
-		int length = buffer.getInt();
-		byte barray[] = new byte[length];
-		buffer.get(barray);
-		filename = new String(barray);
+		if (valid == 1) {

Review comment:
       I guess we shoud set filename to null when it is not valid.




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

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