Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

protection against wrong word hash length see http://www.yacy-forum.de/viewtopic.php?p=35657#35657

orbiterb28e5d0ee91b
diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java
index 461120589..607a73825 100644
--- a/source/de/anomic/plasma/plasmaWordIndex.java
+++ b/source/de/anomic/plasma/plasmaWordIndex.java
@@ -54,6 +54,7 @@ import de.anomic.plasma.urlPattern.plasmaURLPattern;
import de.anomic.server.logging.serverLog;
import de.anomic.server.serverMemory;
import de.anomic.yacy.yacyDHTAction;
+import de.anomic.yacy.yacySeedDB;
public final class plasmaWordIndex implements indexRI {
@@ -323,7 +324,11 @@ public final class plasmaWordIndex implements indexRI {
}
public indexContainer getContainer(String wordHash, Set urlselection, long maxTime) {
-
+ if ((wordHash == null) || (wordHash.length() != yacySeedDB.commonHashLength)) {
+ // wrong input
+ return null;
+ }
+
// get from cache
indexContainer container;
synchronized (dhtOutCache) {