qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 06/14] block/vvfat.c: fix warnings with _FORTIFY


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 06/14] block/vvfat.c: fix warnings with _FORTIFY_SOURCE
Date: Thu, 31 Dec 2009 08:55:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 12/31/2009 02:33 AM, Kirill A. Shutemov wrote:
+       snprintf((char*)entry->name,8,"QEMU VV");
+       snprintf((char*)entry->extension,3,"FAT");

Wrong, the split should be "QEMU VVF" and "AT". Even better, change it to "QEMU VVF" and "AT " with a trailing space and use memcpy since it's not a NULL-terminated name.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]