Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132337139
D48629.id149785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
461 B
Referenced Files
None
Subscribers
None
D48629.id149785.diff
View Options
diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -1780,12 +1780,10 @@
{
int i;
- for (i = 0; phys_avail[i + 1]; i += 2)
- continue;
- if (i > PHYS_AVAIL_ENTRIES)
- panic("Improperly terminated phys_avail %d entries", i);
-
- return (i);
+ for (i = 0; i < PHYS_AVAIL_COUNT; i += 2)
+ if (phys_avail[i] == 0 && phys_avail[i+1] == 0)
+ return (i);
+ panic("Improperly terminated phys_avail[]");
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 17, 12:49 AM (5 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23810969
Default Alt Text
D48629.id149785.diff (461 B)
Attached To
Mode
D48629: vm_phys_avail_count(): Fix out-of-bounds accesses
Attached
Detach File
Event Timeline
Log In to Comment