aboutsummaryrefslogtreecommitdiffstats
path: root/wintun.c
diff options
context:
space:
mode:
Diffstat (limited to 'wintun.c')
-rw-r--r--wintun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wintun.c b/wintun.c
index 8476533..aba7f2c 100644
--- a/wintun.c
+++ b/wintun.c
@@ -685,8 +685,8 @@ static NTSTATUS TunDispatchWrite(_Inout_ TUN_CTX *ctx, _Inout_ IRP *Irp)
status = STATUS_INVALID_USER_BUFFER;
goto cleanup_nbl_queues;
}
- ptrdiff_t p_size = TunPacketAlign(sizeof(TUN_PACKET) + p->Size);
- if (b_end - b < p_size) {
+ ULONG p_size = TunPacketAlign(sizeof(TUN_PACKET) + p->Size);
+ if (b_end - b < (ptrdiff_t)p_size) {
status = STATUS_INVALID_USER_BUFFER;
goto cleanup_nbl_queues;
}