mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 08:25:38 +00:00
fix ANDROID-38: stack corruption in onSendPacketRequested
This commit is contained in:
parent
132bff25df
commit
0a925a6f21
@ -402,7 +402,7 @@ namespace {
|
||||
unsigned int bufferSize,
|
||||
unsigned int ttl)
|
||||
{
|
||||
LOGV("WirePacketSendFunction(%lld, %p, %p, %d)", (long long)localSocket, remoteAddress, buffer, bufferSize);
|
||||
LOGV("WirePacketSendFunction(%lld, %p, %p, %d, %u)", (long long)localSocket, remoteAddress, buffer, bufferSize, ttl);
|
||||
JniRef *ref = (JniRef*)userData;
|
||||
assert(ref->node == node);
|
||||
|
||||
@ -428,7 +428,7 @@ namespace {
|
||||
return -102;
|
||||
}
|
||||
|
||||
int retval = env->CallIntMethod(ref->packetSender, PacketSender_onSendPacketRequested_method, localSocket, remoteAddressObj, bufferObj);
|
||||
int retval = env->CallIntMethod(ref->packetSender, PacketSender_onSendPacketRequested_method, localSocket, remoteAddressObj, bufferObj, 0);
|
||||
|
||||
LOGV("JNI Packet Sender returned: %d", retval);
|
||||
return retval;
|
||||
|
@ -42,6 +42,7 @@ public interface PacketSender {
|
||||
* @param localSocket socket file descriptor to send from. Set to -1 if not specified.
|
||||
* @param remoteAddr {@link InetSocketAddress} to send to
|
||||
* @param packetData data to send
|
||||
* @param ttl TTL is ignored
|
||||
* @return 0 on success, any error code on failure.
|
||||
*/
|
||||
public int onSendPacketRequested(
|
||||
|
Loading…
x
Reference in New Issue
Block a user