VirtualBox

Changeset 13201 in vbox


Ignore:
Timestamp:
Oct 13, 2008 9:35:40 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37744
Message:

Could return uninitialized variable in the bridging case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r13192 r13201  
    523523    uint8_t iBus, iDevice;
    524524    uint32_t config_addr;
    525     uint32_t val;
     525    uint32_t val = 0xffffffff;
    526526
    527527    if (!(pGlobals->uConfigReg & (1 << 31)))
    528         goto fail;
     528        goto the_end;
    529529    if ((pGlobals->uConfigReg & 0x3) != 0)
    530         goto fail;
     530        goto the_end;
    531531    iBus = (pGlobals->uConfigReg >> 16) & 0xff;
    532532    iDevice = (pGlobals->uConfigReg >> 8) & 0xff;
     
    566566        pci_dev = pGlobals->PciBus.devices[iDevice];
    567567        if (!pci_dev) {
    568         fail:
    569             switch(len) {
    570             case 1:
    571                 val = 0xff;
    572                 break;
    573             case 2:
    574                 val = 0xffff;
    575                 break;
    576             default:
    577             case 4:
    578                 val = 0xffffffff;
    579                 break;
    580             }
    581568            goto the_end;
    582569        }
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