Skip to content

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

fix for another BMP parser problem. This is not a bug, I guess it was caused by a corrupted graphics file. see http://forum.yacy-websuche.de/viewtopic.php?f=6&t=180&hilit=&p=1017#p1017

orbiterbf6f6820ec01
diff --git a/source/de/anomic/yacy/yacyVersion.java b/source/de/anomic/yacy/yacyVersion.java
index f562d6f65..38ef198b0 100644
--- a/source/de/anomic/yacy/yacyVersion.java
+++ b/source/de/anomic/yacy/yacyVersion.java
@@ -172,25 +172,6 @@ public final class yacyVersion implements Comparator, Comparable {
return thisVersion;
}
- public static final boolean shallRetrieveUpdateInfo() {
- // according to update properties, decide if we should retrieve update information
- // if true, the release that can be obtained is returned.
- // if false, null is returned
- plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
-
- // check if update process allowes update retrieve
- String process = sb.getConfig("update.process", "manual");
- if (process.equals("manual")) return false; // no, its a manual process
-
- // check if the last retrieve time is a minimum time ago
- long cycle = Math.max(1, sb.getConfigLong("update.cycle", 168)) * 60 * 60 * 1000; // update.cycle is hours
- long timeLookup = sb.getConfigLong("update.time.lookup", System.currentTimeMillis());
- if (timeLookup + cycle > System.currentTimeMillis()) return false; // no we have recently made a lookup
-
- // ok, we may do a lookup
- return true;
- }
-
public static final yacyVersion rulebasedUpdateInfo(boolean manual) {
// according to update properties, decide if we should retrieve update information
// if true, the release that can be obtained is returned.
diff --git a/source/de/anomic/ymage/ymageBMPParser.java b/source/de/anomic/ymage/ymageBMPParser.java
index cd0c95708..975d2b99e 100644
--- a/source/de/anomic/ymage/ymageBMPParser.java
+++ b/source/de/anomic/ymage/ymageBMPParser.java
@@ -75,6 +75,7 @@ public class ymageBMPParser {
}
public static final int DWORD(byte[] b, int offset) {
+ if (offset + 3 >= b.length) return 0;
int ret = ((int) b[offset + 3] & 0xff);
ret = (ret << 8) | ((int) b[offset + 2] & 0xff);
ret = (ret << 8) | ((int) b[offset + 1] & 0xff);