Changeset 5611 in vbox
- Timestamp:
- Nov 2, 2007 11:40:44 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25903
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleVRDPServer.cpp
r4876 r5611 644 644 case VRDP_QP_NETWORK_ADDRESS: 645 645 { 646 com::Bstr address; 647 server->mConsole->getVRDPServer ()->COMGETTER(NetAddress) (address.asOutParam()); 648 649 if (cbBuffer >= address.length ()) 650 { 651 if (address.length () > 0) 646 com::Bstr bstr; 647 server->mConsole->getVRDPServer ()->COMGETTER(NetAddress) (bstr.asOutParam()); 648 649 /* The server expects UTF8. */ 650 com::Utf8Str address = bstr; 651 652 size_t cbAddress = address.length () + 1; 653 654 if (cbAddress >= 0x10000) 655 { 656 /* More than 64K seems to be an invalid address. */ 657 rc = VERR_TOO_MUCH_DATA; 658 break; 659 } 660 661 if ((size_t)cbBuffer >= cbAddress) 662 { 663 if (cbAddress > 0) 652 664 { 653 memcpy (pvBuffer, address.raw(), address.length ());665 memcpy (pvBuffer, address.raw(), cbAddress); 654 666 } 667 655 668 rc = VINF_SUCCESS; 656 669 } 657 658 *pcbOut = address.length (); 670 else 671 { 672 rc = VINF_BUFFER_OVERFLOW; 673 } 674 675 *pcbOut = (uint32_t)cbAddress; 659 676 } break; 660 677
Note:
See TracChangeset
for help on using the changeset viewer.