VirtualBox

vbox的更動 66012 路徑 trunk/src/VBox/HostServices


忽略:
時間撮記:
2017-3-9 下午01:02:50 (8 年 以前)
作者:
vboxsync
訊息:

tstSharedFolderService: fix the loop.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstSharedFolderService.cpp

    r66011 r66012  
    511511                               const char *pcszSource)
    512512{
    513     AssertRelease(  strlen(pcszSource) * 2 + 2
     513    const size_t cchSource = strlen(pcszSource);
     514    AssertRelease(  cchSource * 2 + 2
    514515                  < sizeof(*pDest) - RT_UOFFSETOF(SHFLSTRING, String));
    515     pDest->string.u16Length = (uint16_t)(strlen(pcszSource) * sizeof(RTUTF16));
     516    pDest->string.u16Length = (uint16_t)(cchSource * sizeof(RTUTF16));
    516517    pDest->string.u16Size   = pDest->string.u16Length + sizeof(RTUTF16);
    517     for (unsigned i = 0; i <= pDest->string.u16Length; ++i)
     518    /* Copy pcszSource ASCIIZ, including the trailing 0, to the UTF16 pDest->string.String.ucs2. */
     519    for (unsigned i = 0; i <= cchSource; ++i)
    518520        ((uint16_t*)pDest->string.String.ucs2)[i] = (uint16_t)pcszSource[i];
    519521}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette