diff --git a/plug-ins/file-icns/file-icns-load.c b/plug-ins/file-icns/file-icns-load.c index c8f16fef60..f2298c056e 100644 --- a/plug-ins/file-icns/file-icns-load.c +++ b/plug-ins/file-icns/file-icns-load.c @@ -323,7 +323,7 @@ icns_decompress (guchar *dest, for (run -= 125; run > 0; run--) { - if (out > max) + if (out >= max) { g_message ("Corrupt icon? compressed run overflows output size."); return FALSE; @@ -341,7 +341,7 @@ icns_decompress (guchar *dest, g_message ("Corrupt icon: uncompressed run overflows input size."); return FALSE; } - if (out > max) + if (out >= max) { g_message ("Corrupt icon: uncompressed run overflows output size."); return FALSE;