VirtualBox

Changeset 107605 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jan 9, 2025 5:32:38 PM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166685
Message:

Additions: Linux: vboxvideo: Additional fix for UBSAN warnings, bugref:10585.

Location:
trunk/src/VBox/Additions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r106061 r107605  
    233233    if (cbPixels)
    234234        /* Copy the actual pointer data. */
    235         memcpy (p->au8Data, pPixels, cbPixels);
     235        RT_BCOPY_UNFORTIFIED(p->au8Data, pPixels, cbPixels);
    236236    /* No need to check that the buffer is valid as we have just allocated it. */
    237237    VBoxHGSMIBufferSubmit(pCtx, p);
  • trunk/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp

    r106061 r107605  
    253253    VBVABUFFER *pVBVA = pCtx->pVBVA;
    254254    uint32_t u32BytesTillBoundary = pVBVA->cbData - offset;
    255     uint8_t  *dst                 = &pVBVA->au8Data[offset];
     255    uint8_t  *dst                 = &pVBVA->au8Data[0] + offset;
    256256    int32_t i32Diff               = cb - u32BytesTillBoundary;
    257257
     
    259259    {
    260260        /* Chunk will not cross buffer boundary. */
    261         memcpy (dst, p, cb);
     261        RT_BCOPY_UNFORTIFIED(dst, p, cb);
    262262    }
    263263    else
    264264    {
    265265        /* Chunk crosses buffer boundary. */
    266         memcpy (dst, p, u32BytesTillBoundary);
    267         memcpy (&pVBVA->au8Data[0], (uint8_t *)p + u32BytesTillBoundary, i32Diff);
     266        RT_BCOPY_UNFORTIFIED(dst, p, u32BytesTillBoundary);
     267        RT_BCOPY_UNFORTIFIED(&pVBVA->au8Data[0], (uint8_t *)p + u32BytesTillBoundary, i32Diff);
    268268    }
    269269}
  • trunk/src/VBox/Additions/linux/drm/Makefile.module.kms

    r106061 r107605  
    4545
    4646VBOXMOD_NAME = vboxvideo
     47VBOXMOD_CFLAGS = -DRT_OS_LINUX
    4748VBOXMOD_OBJS = \
    4849        hgsmi_base.o \
Note: See TracChangeset for help on using the changeset viewer.

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