- Timestamp:
- Jan 13, 2021 12:33:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Misc/DevVirtualKD.cpp
r87169 r87234 143 143 * Write the reply to guest memory (overwriting the request): 144 144 */ 145 /** @todo r=bird: RequestHeader.cbReplyMax is not taken into account here! */145 cbReply = RT_MIN(cbReply + 2, sRequestHeader.cbReplyMax); 146 146 VKDREPLYHDR ReplyHeader; 147 ReplyHeader.cbData = cbReply + 2;147 ReplyHeader.cbData = cbReply; /* The '1' and ' ' bytes count towards reply size. */ 148 148 ReplyHeader.chOne = '1'; 149 149 ReplyHeader.chSpace = ' '; 150 rc = PDMDevHlpPhysWrite(pDevIns, GCPhys, &ReplyHeader, sizeof(ReplyHeader ));151 if (cbReply && RT_SUCCESS(rc))152 rc = PDMDevHlpPhysWrite(pDevIns, GCPhys + sizeof(ReplyHeader), pbReply, cbReply );150 rc = PDMDevHlpPhysWrite(pDevIns, GCPhys, &ReplyHeader, sizeof(ReplyHeader.cbData) + RT_MIN(cbReply, 2)); 151 if (cbReply > 2 && RT_SUCCESS(rc)) 152 rc = PDMDevHlpPhysWrite(pDevIns, GCPhys + sizeof(ReplyHeader), pbReply, cbReply - 2); 153 153 } 154 154 }
Note:
See TracChangeset
for help on using the changeset viewer.