summaryrefslogtreecommitdiff
path: root/qobject/qdict.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-11-25 13:59:11 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2015-11-25 17:56:31 -0600
commit895b00f62a7e86724dc7352d67c7808d37366130 (patch)
tree4262acf90a4eb9aca73245062014b5869f5b109e /qobject/qdict.c
parentf2b608ab80a336b0136d35d9b49419a917656d44 (diff)
downloadqemu-895b00f62a7e86724dc7352d67c7808d37366130.tar.gz
qga: flush explicitly when needed
According to the specification: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html "the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function (fseek(), fsetpos(), or rewind()), and input is not directly followed by output without an intervening call to a file positioning function, unless the input operation encounters end-of-file." Without this change, an fwrite() followed by an fread() may lose the previously written content, as shown in the following test. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1210246 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> * don't confuse {write,read}() with f{write,read}() in commit msg (Laszlo) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qobject/qdict.c')
0 files changed, 0 insertions, 0 deletions