Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sys/windivert.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,12 +933,12 @@ static const struct layer_s windivert_layer_flow_established_ipv6 =
*/
static PVOID windivert_malloc(SIZE_T size, BOOL paged)
{
POOL_TYPE pool = (paged? PagedPool: non_paged_pool);
POOL_TYPE pool = (paged? POOL_FLAG_PAGED: POOL_FLAG_NON_PAGED);
if (size == 0)
{
return NULL;
}
return ExAllocatePoolWithTag(pool, size, WINDIVERT_TAG);
return ExAllocatePool2(pool, size, WINDIVERT_TAG);
}
static VOID windivert_free(PVOID ptr)
{
Expand Down Expand Up @@ -5301,6 +5301,7 @@ static void windivert_inject_packet_too_big(packet_t packet)
}
ip_header = (PWINDIVERT_IPHDR)WINDIVERT_PACKET_DATA_PTR(
WINDIVERT_DATA_NETWORK, packet);
ipv6_header = (PWINDIVERT_IPV6HDR)ip_header;
version = ip_header->Version;
switch (version)
{
Expand All @@ -5312,7 +5313,6 @@ static void windivert_inject_packet_too_big(packet_t packet)
copy_len;
break;
case 6:
ipv6_header = (PWINDIVERT_IPV6HDR)ip_header;
packet_len = RtlUshortByteSwap(ipv6_header->Length) +
sizeof(WINDIVERT_IPV6HDR);
min_mtu = /*ipv6 min MTU=*/1280;
Expand Down Expand Up @@ -6428,7 +6428,7 @@ static void windivert_log_event(PEPROCESS process, PDRIVER_OBJECT driver,
const wchar_t windivert_str[] = WINDIVERT_DEVICE_NAME
WINDIVERT_VERSION_LSTR;
wchar_t pid_str[16];
size_t windivert_size = sizeof(windivert_str), msg_size, pid_size, size;
size_t windivert_size = sizeof(windivert_str), msg_size, pid_size = 0, size;
UNICODE_STRING string;
UINT8 *str;
PIO_ERROR_LOG_PACKET packet;
Expand Down
2 changes: 1 addition & 1 deletion sys/windivert.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
Expand Down