Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit 33db9332 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: fixed buffer overflow warning in serial_flash.c

(found with ASan; not affecting well-behaved code)

--HG--
branch : qemu
parent f973fe125b1c
......@@ -128,7 +128,6 @@ uint8_t serial_flash_spi_read(SerialFlashState * sf)
break;
case 0x9f: // Read id
sf->read_value = sf->RDID_seq[sf->substate+1];
sf->rw_count++;
sf->substate++;
if (sf->substate == 3)
......@@ -136,6 +135,7 @@ uint8_t serial_flash_spi_read(SerialFlashState * sf)
sf->state = 0;
sf->substate = 0;
}
sf->read_value = sf->RDID_seq[sf->substate];
EE_DPRINTF("Verbose: READ in RDID = %02Xh\n", ret);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment