Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161237024
D48629.id150690.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
463 B
Referenced Files
None
Subscribers
None
D48629.id150690.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
@@ -1782,12 +1782,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, Jul 3, 12:23 AM (7 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34606786
Default Alt Text
D48629.id150690.diff (463 B)
Attached To
Mode
D48629: vm_phys_avail_count(): Fix out-of-bounds accesses
Attached
Detach File
Event Timeline
Log In to Comment