I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit fde36fe2 authored by zzz's avatar zzz
Browse files

flip backwards arraycopy args

parent 40e820ca
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public class SOCKSUDPUnwrapper implements Source, Sink {
int headerlen = h.getBytes().length;
byte unwrapped[] = new byte[data.length - headerlen];
System.arraycopy(unwrapped, 0, data, headerlen, unwrapped.length);
System.arraycopy(data, headerlen, unwrapped, 0, unwrapped.length);
this.sink.send(dest, unwrapped);
}
......
......@@ -39,8 +39,8 @@ public class SOCKSUDPWrapper implements Source, Sink {
byte[] header = h.getBytes();
byte wrapped[] = new byte[header.length + data.length];
System.arraycopy(wrapped, 0, header, 0, header.length);
System.arraycopy(wrapped, header.length, data, 0, data.length);
System.arraycopy(header, 0, wrapped, 0, header.length);
System.arraycopy(data, 0, wrapped, header.length, data.length);
this.sink.send(from, wrapped);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment