Inhibit wraparound in comparison.
This commit is contained in:
parent
1e5f0fea9f
commit
0a1645d9a3
|
@ -442,8 +442,8 @@ BOOL16 WINAPI IsBadStringPtr16( SEGPTR ptr, UINT16 size )
|
|||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return TRUE;
|
||||
if (strlen(PTR_SEG_TO_LIN(ptr)) < size) size = strlen(PTR_SEG_TO_LIN(ptr));
|
||||
if (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel)) return TRUE;
|
||||
if (strlen(PTR_SEG_TO_LIN(ptr)) < size) size = strlen(PTR_SEG_TO_LIN(ptr)) + 1;
|
||||
if (size && (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ BOOL16 WINAPI IsBadHugeReadPtr16( SEGPTR ptr, DWORD size )
|
|||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) && entry.read_only) return TRUE;
|
||||
if (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel)) return TRUE;
|
||||
if (size && (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ BOOL16 WINAPI IsBadHugeWritePtr16( SEGPTR ptr, DWORD size )
|
|||
if (IS_SELECTOR_FREE(sel)) return TRUE;
|
||||
LDT_GetEntry( SELECTOR_TO_ENTRY(sel), &entry );
|
||||
if ((entry.type == SEGMENT_CODE) || entry.read_only) return TRUE;
|
||||
if (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel)) return TRUE;
|
||||
if (size && (OFFSETOF(ptr) + size - 1 > GET_SEL_LIMIT(sel))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue