]> xenbits.xensource.com Git - qemu-xen-unstable.git/commit
block-vvfat: fix fat_chksum() buffer overrun warning
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Nov 2014 11:54:11 +0000 (11:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Oct 2015 15:52:06 +0000 (16:52 +0100)
commitaf9e620745434868b0aeebc00c6ca1cadd9a01c9
treec063752390aa0d91c72f795e7d94707135e429fa
parentfb9ee2e1049f7ca8f597a00360745ead64fd974b
block-vvfat: fix fat_chksum() buffer overrun warning

Newer GCC versions raise an undefined behaviour warning in
fat_chksum() because it overruns the name buffer.  However, this is
intentional behaviour because the extension array immediately follows.

Refactor this function to avoid the warning and make it clear it's
checksumming both parts.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Coverity-ID: 1055738
block-vvfat.c