otr4j / otr4j-issues

1 stars 0 forks source link

special chars on SMP question input can cause Exceptions #10

Closed eighthave closed 4 years ago

eighthave commented 9 years ago

Using Strings like these as the SMP question triggers an Exception: "nullshere:\0\0andhere:\0", "tabbackslashT\t", "backslashR\r", "NEWLINE\n",:

Exception in thread "Thread-52" java.lang.ArrayIndexOutOfBoundsException: 0
    at net.java.otr4j.crypto.SM.step2a(SM.java:404)
    at net.java.otr4j.session.OtrSm.processTlvSMP1Q(OtrSm.java:203)
    at net.java.otr4j.session.Session.handleDataMessage(Session.java:657)
    at net.java.otr4j.session.Session.transformReceiving(Session.java:454)
    at net.java.otr4j.test.dummyclient.DummyClient$MessageProcessor.process(DummyClient.java:197)
    at net.java.otr4j.test.dummyclient.DummyClient$MessageProcessor.run(DummyClient.java:221)
    at java.lang.Thread.run(Thread.java:745)
cobratbq commented 5 years ago

This should be mitigated now.