This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push:
new 91dc17638 Better local variable name
91dc17638 is described below
commit 91dc1763820bfc6a3efdedd543b79235559a7714
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Apr 28 17:34:56 2026 -0400
Better local variable name
---
.../commons/compress/archivers/cpio/CpioArchiveInputStream.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
index 16b9fe103..836700e20 100644
---
a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
+++
b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java
@@ -462,18 +462,18 @@ private CpioArchiveEntry readNewEntry(final boolean
hasCrc) throws IOException {
newEntry.setDeviceMin(readAsciiLong(8, 16));
newEntry.setRemoteDeviceMaj(readAsciiLong(8, 16));
newEntry.setRemoteDeviceMin(readAsciiLong(8, 16));
- final long namesize = readAsciiLong(8, 16);
- if (namesize <= 0) {
+ final long nameSize = readAsciiLong(8, 16);
+ if (nameSize <= 0) {
throw new ArchiveException("Found illegal entry with negative name
length");
}
newEntry.setChksum(readAsciiLong(8, 16));
- final String name =
readEntryName(ArchiveException.toIntExact(namesize));
+ final String name =
readEntryName(ArchiveException.toIntExact(nameSize));
newEntry.setName(name);
if (CpioUtil.fileType(mode) == 0 && !name.equals(CPIO_TRAILER)) {
throw new ArchiveException(
"Mode 0 only allowed in the trailer. Found entry name: " +
ArchiveUtils.sanitize(name) + " Occurred at byte: " + getBytesRead());
}
- final int headerPadCount = newEntry.getHeaderPadCount(namesize - 1);
+ final int headerPadCount = newEntry.getHeaderPadCount(nameSize - 1);
if (skip(headerPadCount) != headerPadCount) {
throw new ArchiveException("Header pad count mismatch.");
}