Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142947800
D31372.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
897 B
Referenced Files
None
Subscribers
None
D31372.diff
View Options
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -174,7 +174,7 @@
struct mem_map mem_maps[VM_MAX_MEMMAPS]; /* (i) guest address space */
struct mem_seg mem_segs[VM_MAX_MEMSEGS]; /* (o) guest memory regions */
struct vmspace *vmspace; /* (o) guest's address space */
- char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */
+ char name[VM_MAX_NAMELEN+1]; /* (o) virtual machine name */
struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */
/* The following describe the vm cpu topology */
uint16_t sockets; /* (o) num of sockets */
@@ -480,7 +480,8 @@
if (!vmm_initialized)
return (ENXIO);
- if (name == NULL || strlen(name) >= VM_MAX_NAMELEN)
+ if (name == NULL || strnlen(name, VM_MAX_NAMELEN + 1) ==
+ VM_MAX_NAMELEN + 1)
return (EINVAL);
vmspace = vmmops_vmspace_alloc(0, VM_MAXUSER_ADDRESS_LA48);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 9:32 PM (14 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27970896
Default Alt Text
D31372.diff (897 B)
Attached To
Mode
D31372: vmm: Bump vmname buffer in struct vm to VM_MAX_NAMELEN + 1
Attached
Detach File
Event Timeline
Log In to Comment