Re: [Qemu-devel] [PATCH for-2.0 33/47] dmg: prevent out-of-bounds array access on terminator

2014-03-28 Thread Max Reitz
On 26.03.2014 13:05, Stefan Hajnoczi wrote: When a terminator is reached the base for offsets and sectors is stored. The following records that are processed will use this base value. If the first record we encounter is a terminator, then calculating the base values would result in

[Qemu-devel] [PATCH for-2.0 33/47] dmg: prevent out-of-bounds array access on terminator

2014-03-26 Thread Stefan Hajnoczi
When a terminator is reached the base for offsets and sectors is stored. The following records that are processed will use this base value. If the first record we encounter is a terminator, then calculating the base values would result in out-of-bounds array accesses. Don't do that.