VirtualBox

Changeset 103767 in vbox


Ignore:
Timestamp:
Mar 11, 2024 2:23:25 PM (9 months ago)
Author:
vboxsync
Message:

Additions: Linux: vboxsf: Few more fixes for UBSAN, bugref:10585.

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r102990 r103767  
    25362536                size_t iPage = cPages;
    25372537                while (iPage-- > 0)
    2538                     pReq->PgLst.aPages[iPage] = page_to_phys(papPages[iPage]);
     2538                {
     2539                    RTGCPHYS64 * paDstPages = pReq->PgLst.aPages;
     2540                    paDstPages[iPage] = page_to_phys(papPages[iPage]);
     2541                }
     2542
    25392543                pReq->PgLst.offFirstPage = (uint16_t)offPage0;
    25402544                AssertStmt(cbChunk <= cbToRead, cbChunk = cbToRead);
     
    27502754                size_t iPage = cPages;
    27512755                while (iPage-- > 0)
    2752                     pReq->PgLst.aPages[iPage] = page_to_phys(papPages[iPage]);
     2756                {
     2757                    RTGCPHYS64 * paDstPages = pReq->PgLst.aPages;
     2758                    paDstPages[iPage] = page_to_phys(papPages[iPage]);
     2759                }
    27532760                pReq->PgLst.offFirstPage = (uint16_t)offPage0;
    27542761                AssertStmt(cbChunk <= cbToWrite, cbChunk = cbToWrite);
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r103067 r103767  
    191191            pString = (PSHFLSTRING)kmalloc(SHFLSTRING_HEADER_SIZE + cchNls + 1, GFP_KERNEL);
    192192            if (pString) {
     193                char *pchDst = pString->String.ach;
    193194                pString->u16Length = (uint16_t)cchNls;
    194195                pString->u16Size   = (uint16_t)(cchNls + 1);
    195                 RT_BCOPY_UNFORTIFIED(pString->String.ach, pszNls, cchNls);
    196                 pString->String.ach[cchNls] = '\0';
     196                RT_BCOPY_UNFORTIFIED(pchDst, pszNls, cchNls);
     197                pchDst[cchNls] = '\0';
    197198                rc = 0;
    198199            } else {
Note: See TracChangeset for help on using the changeset viewer.

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