Skip to content

Commit 95c82b9

Browse files
committed
3rd win fx
1 parent 08d969f commit 95c82b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sql/sp_head.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,9 +1711,10 @@ int is_valid_pointer(void *ptr) {
17111711
return 0;
17121712
if (mbi.Protect & (PAGE_GUARD | PAGE_NOACCESS))
17131713
return 0;
1714-
// Verify read access is allowed
1715-
if (!(mbi.Protect & (PAGE_READONLY | PAGE_READWRITE | PAGE_EXECUTE_READ |
1716-
PAGE_EXECUTE_READWRITE)))
1714+
// Strip modifier flags (PAGE_GUARD, PAGE_NOCACHE, etc.) to get base protection
1715+
DWORD base_protect = mbi.Protect & 0xFF;
1716+
// Reject execute-only pages (all other base protections allow reading)
1717+
if (base_protect == PAGE_EXECUTE)
17171718
return 0;
17181719

17191720
return 1;

0 commit comments

Comments
 (0)