Functional and security updates #37
@@ -118,7 +118,7 @@ static void piix_ide_reset(DeviceState *dev)
|
||||
pci_set_word(pci_conf + PCI_COMMAND, 0x0000);
|
||||
pci_set_word(pci_conf + PCI_STATUS,
|
||||
PCI_STATUS_DEVSEL_MEDIUM | PCI_STATUS_FAST_BACK);
|
||||
pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */
|
||||
pci_set_long(pci_conf + 0x20, 0x1); /* BMIBA: 20-23h */
|
||||
}
|
||||
|
||||
static bool pci_piix_init_bus(PCIIDEState *d, unsigned i, Error **errp)
|
||||
|
||||
@@ -50,8 +50,11 @@ static uint8_t *inflate_buffer(uint8_t *in, uint32_t in_len, uint32_t *size)
|
||||
ret = inflate(&stream, Z_FINISH);
|
||||
switch (ret) {
|
||||
case Z_OK:
|
||||
case Z_STREAM_END:
|
||||
break;
|
||||
case Z_STREAM_END:
|
||||
*size = stream.total_out;
|
||||
inflateEnd(&stream);
|
||||
return out;
|
||||
case Z_BUF_ERROR:
|
||||
out_len <<= 1;
|
||||
if (out_len > (1 << 20)) {
|
||||
@@ -66,11 +69,6 @@ static uint8_t *inflate_buffer(uint8_t *in, uint32_t in_len, uint32_t *size)
|
||||
}
|
||||
}
|
||||
|
||||
*size = stream.total_out;
|
||||
inflateEnd(&stream);
|
||||
|
||||
return out;
|
||||
|
||||
err_end:
|
||||
inflateEnd(&stream);
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user