syvaidya / openstego

OpenStego is a steganography application that provides two functionalities: a) Data Hiding: It can hide any data within an image file. b) Watermarking: Watermarking image files with an invisible signature. It can be used to detect unauthorized file copying.
https://www.openstego.com
GNU General Public License v2.0
1.15k stars 212 forks source link

heap overflow #6

Closed knezi closed 8 years ago

knezi commented 8 years ago

Hi, running Arch Linux.

[knezi@holly ~]$ java -version
java version "1.7.0_101"
OpenJDK Runtime Environment (IcedTea 2.6.6) (Arch Linux build 7.u101_2.6.6-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

If I try to hide a file (82 bytes) into a 9MB image, the both cores of cpu are at 100% and after a while I get:

[knezi@holly ~]$  openstego embed -mf pas -cf CIMG3020.JPG 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at net.sourceforge.openstego.plugin.randlsb.RandomLSBOutputStream.writeHeader(RandomLSBOutputStream.java:157)
        at net.sourceforge.openstego.plugin.randlsb.RandomLSBOutputStream.<init>(RandomLSBOutputStream.java:116)
        at net.sourceforge.openstego.plugin.randlsb.RandomLSBPlugin.embedData(RandomLSBPlugin.java:95)
        at net.sourceforge.openstego.OpenStego.embedData(OpenStego.java:137)
        at net.sourceforge.openstego.OpenStego.embedData(OpenStego.java:181)
        at net.sourceforge.openstego.OpenStegoCmd.execute(OpenStegoCmd.java:181)
        at net.sourceforge.openstego.OpenStego.main(OpenStego.java:516)
syvaidya commented 8 years ago

Can you try increasing the heap size in openstego.sh file? The option for the same is "-Xmx".