VirtualBox

Changeset 72842 in vbox


Ignore:
Timestamp:
Jul 4, 2018 1:26:54 AM (6 years ago)
Author:
vboxsync
Message:

AsyncCompletion: range-check array index first, not after using it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstPDMAsyncCompletionStress.cpp

    r69111 r72842  
    180180            unsigned idx = 0;
    181181
    182             while (   (pbBuf[idx] == pbTestPattern[idx])
    183                    && (idx < cbCompare))
     182            while (   (idx < cbCompare)
     183                   && (pbBuf[idx] == pbTestPattern[idx]))
    184184                idx++;
    185185
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