Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150990665
D25202.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25202.diff
View Options
Index: head/stand/efi/loader/efiserialio.c
===================================================================
--- head/stand/efi/loader/efiserialio.c
+++ head/stand/efi/loader/efiserialio.c
@@ -216,8 +216,9 @@
status = efi_global_getenv(name, buf, &sz);
if (status == EFI_BUFFER_TOO_SMALL) {
buf = malloc(sz);
- if (buf != NULL)
- status = efi_global_getenv(name, buf, &sz);
+ if (buf == NULL)
+ return (NULL);
+ status = efi_global_getenv(name, buf, &sz);
}
if (status != EFI_SUCCESS) {
free(buf);
@@ -232,17 +233,13 @@
free(buf);
return (handle);
}
- if (IsDevicePathEndType(node) &&
- DevicePathSubType(node) ==
- END_INSTANCE_DEVICE_PATH_SUBTYPE) {
- /*
- * Start of next device path in list.
- */
- node = NextDevicePathNode(node);
- continue;
- }
- if (IsDevicePathEnd(node))
+
+ /* Sanity check the node before moving to the next node. */
+ if (DevicePathNodeLength(node) < sizeof(*node))
break;
+
+ /* Start of next device path in list. */
+ node = NextDevicePathNode(node);
}
free(buf);
return (NULL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 8:25 AM (4 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30951238
Default Alt Text
D25202.diff (1 KB)
Attached To
Mode
D25202: Fix the efi serial console in the Arm models
Attached
Detach File
Event Timeline
Log In to Comment