Browse Source

Merge pull request #194 from keithc-ca/tar

Names end before the first NULL (not the last)
master
Stefan Bodewig GitHub 2 years ago
parent
commit
837eab258e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/tar/TarUtils.java

+ 3
- 3
src/main/org/apache/tools/tar/TarUtils.java View File

@@ -286,9 +286,9 @@ public class TarUtils {
final ZipEncoding encoding)
throws IOException {

int len = length;
for (; len > 0; len--) {
if (buffer[offset + len - 1] != 0) {
int len = 0;
for (; len < length; ++len) {
if (buffer[offset + len] == 0) {
break;
}
}


Loading…
Cancel
Save