We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08d969f commit 95c82b9Copy full SHA for 95c82b9
sql/sp_head.cc
@@ -1711,9 +1711,10 @@ int is_valid_pointer(void *ptr) {
1711
return 0;
1712
if (mbi.Protect & (PAGE_GUARD | PAGE_NOACCESS))
1713
1714
- // Verify read access is allowed
1715
- if (!(mbi.Protect & (PAGE_READONLY | PAGE_READWRITE | PAGE_EXECUTE_READ |
1716
- PAGE_EXECUTE_READWRITE)))
+ // Strip modifier flags (PAGE_GUARD, PAGE_NOCACHE, etc.) to get base protection
+ DWORD base_protect = mbi.Protect & 0xFF;
+ // Reject execute-only pages (all other base protections allow reading)
1717
+ if (base_protect == PAGE_EXECUTE)
1718
1719
1720
return 1;
0 commit comments