From b28e5d0ee91b6981029b2ad931163fa0f37ef88b Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 14 May 2007 10:00:23 +0000 Subject: [PATCH] protection against wrong word hash length see http://www.yacy-forum.de/viewtopic.php?p=35657#35657 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3723 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaWordIndex.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) {