Re: [Qemu-devel] [PATCH 2/3] nvram: at24c: prevent segfault by checking "rom-size"

2018-03-13 Thread Philippe Mathieu-Daudé
On 03/12/2018 10:42 PM, Wolfram Sang wrote: > The value for "rom-size" is used as a divisor, so it must not be 0 or it > will segfault. A size of 0 wouldn't make sense as well. > > Signed-off-by: Wolfram Sang > --- > hw/nvram/eeprom_at24c.c | 5 + > 1 file changed, 5 insertions(+) > > diff

[Qemu-devel] [PATCH 2/3] nvram: at24c: prevent segfault by checking "rom-size"

2018-03-12 Thread Wolfram Sang
The value for "rom-size" is used as a divisor, so it must not be 0 or it will segfault. A size of 0 wouldn't make sense as well. Signed-off-by: Wolfram Sang --- hw/nvram/eeprom_at24c.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/nvram/eeprom_at24c.c b/hw/nvram/eeprom_at24c.c inde