Author: j16sdiz
Date: 2008-07-10 01:04:53 +0000 (Thu, 10 Jul 2008)
New Revision: 21013

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
Log:
better error handling

Modified: 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-10 01:04:31 UTC (rev 21012)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
   2008-07-10 01:04:53 UTC (rev 21013)
@@ -489,7 +489,7 @@
                }

                private StorableBlock getStorableBlock(byte[] routingKey, 
byte[] fullKey) throws KeyVerifyException {
-                       if ((flag & ENTRY_FLAG_OCCUPIED) == 0)
+                       if (isFree() || header == null || data == null)
                                return null; // this is a free block
                        if (!cipherManager.decrypt(this, routingKey))
                                return null;


Reply via email to