~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
347
347
        {
348
348
            if (pBuffer->uiId == iBuffer)
349
349
            {
 
350
                if (pBuffer->uiSize!=cbBufferSize)
 
351
                {
 
352
                    LogRel(("SHARED_CROPENGL svcGetBuffer: invalid buffer(%i) size %i instead of %i\n",
 
353
                            iBuffer, pBuffer->uiSize, cbBufferSize));
 
354
                    return NULL;
 
355
                }
350
356
                return pBuffer;
351
357
            }
352
358
            pBuffer = pBuffer->pNext;
679
685
 
680
686
                /* Execute the function. */
681
687
                CRVBOXSVCBUFFER_t *pSvcBuffer = svcGetBuffer(iBuffer, cbBufferSize);
682
 
                if (!pSvcBuffer || ui32Offset+cbBuffer>cbBufferSize)
 
688
                if (!pSvcBuffer || ((uint64_t)ui32Offset+cbBuffer)>cbBufferSize)
683
689
                {
684
690
                    rc = VERR_INVALID_PARAMETER;
685
691
                }