GT-2330 fix crushed png issue

Was missing a line of code from the original .c file that moved the
current "pointer".
This commit is contained in:
dev747368 2019-12-06 14:24:03 -05:00
parent 76bd653deb
commit 85bf0f7658

View File

@ -1,13 +1,9 @@
/* ###
* IP: Public Domain
* REVIEWED: YES
* NOTE: https://github.com/soffes/pngdefry
*/
package ghidra.file.formats.ios.png;
import ghidra.file.formats.zlib.ZLIB;
import ghidra.util.task.TaskMonitor;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.*;
@ -15,6 +11,9 @@ import java.util.zip.*;
import org.apache.commons.compress.utils.IOUtils;
import ghidra.file.formats.zlib.ZLIB;
import ghidra.util.task.TaskMonitor;
public class CrushedPNGUtil {
/**
@ -30,7 +29,7 @@ public class CrushedPNGUtil {
boolean foundCgBI = false;
IHDRChunk ihdrChunk = null;
byte[] repackArray = null;
List<PNGChunk> wantedChunks = new ArrayList<PNGChunk>();
List<PNGChunk> wantedChunks = new ArrayList<>();
ByteArrayOutputStream idatStream = new ByteArrayOutputStream();
for (PNGChunk chunk : png.getChunkArray()) {
@ -523,6 +522,7 @@ public class CrushedPNGUtil {
break;
}
srcPtr += 4 * width;
}
}