~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/HostServices/SharedFolders/mappings.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-05-29 10:09:31 UTC
  • mfrom: (3.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120529100931-2xayrbh5hyzm6e9p
Tags: 4.1.16-dfsg-1
* New upstream release.
* Drop 37-fix-build-gcc47.patch, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
 
374
374
    if (pFolderMapping->fValid == true)
375
375
    {
376
 
        pString->u16Length = pFolderMapping->pMapName->u16Length;
377
 
        memcpy(pString->String.ucs2, pFolderMapping->pMapName->String.ucs2, pString->u16Size);
 
376
        if (pString->u16Size < pFolderMapping->pMapName->u16Size)
 
377
        {
 
378
            Log(("vbsfMappingsQuery: passed string too short (%d < %d bytes)!\n",
 
379
                pString->u16Size,  pFolderMapping->pMapName->u16Size));
 
380
            rc = VERR_INVALID_PARAMETER;
 
381
        }
 
382
        else
 
383
        {
 
384
            pString->u16Length = pFolderMapping->pMapName->u16Length;
 
385
            memcpy(pString->String.ucs2, pFolderMapping->pMapName->String.ucs2,
 
386
                   pFolderMapping->pMapName->u16Size);
 
387
        }
378
388
    }
379
389
    else
380
390
        rc = VERR_FILE_NOT_FOUND;