directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [directory-kerby] branch trunk updated: [DIRKRB-734] Fix miss-calculation of number of bytes read for an entry
Date Wed, 01 May 2019 13:21:12 GMT
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/directory-kerby.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1bcb3be  [DIRKRB-734] Fix miss-calculation of number of bytes read for an entry
     new e133929  Merge pull request #44 from farhan5900/clc-bytes-for-entry
1bcb3be is described below

commit 1bcb3be1d538e3d36677030ffd71615214b8e253
Author: farhan5900 <farhan5900@gmail.com>
AuthorDate: Tue Apr 30 23:19:59 2019 +0530

    [DIRKRB-734] Fix miss-calculation of number of bytes read for an entry
---
 .../src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
index 3d97db0..5695069 100644
--- a/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
+++ b/kerby-kerb/kerb-util/src/main/java/org/apache/kerby/kerberos/kerb/keytab/Keytab.java
@@ -191,6 +191,7 @@ public final class Keytab implements KrbKeytab {
         int bytesLeft = kis.available();
         while (bytesLeft > 0) {
             int entrySize = kis.readInt();
+            bytesLeft = bytesLeft - Integer.SIZE / 8;
             if (kis.available() < entrySize) {
                 throw new IOException("Bad input stream with less data than expected: " +
entrySize);
             }


Mime
View raw message