mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 10:30:03 +01:00
gbufferedoutputstream: Fix jump conditional on uninitialised data
The flush data structures were not zero-initialised, which meant the branch in flush_buffer_thread() was based on an uninitialised condition. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
cbfa776fc1
commit
c1d8b9c806
@ -699,7 +699,7 @@ g_buffered_output_stream_flush_async (GOutputStream *stream,
|
||||
GTask *task;
|
||||
FlushData *fdata;
|
||||
|
||||
fdata = g_slice_new (FlushData);
|
||||
fdata = g_slice_new0 (FlushData);
|
||||
fdata->flush_stream = TRUE;
|
||||
fdata->close_stream = FALSE;
|
||||
|
||||
@ -732,7 +732,7 @@ g_buffered_output_stream_close_async (GOutputStream *stream,
|
||||
GTask *task;
|
||||
FlushData *fdata;
|
||||
|
||||
fdata = g_slice_new (FlushData);
|
||||
fdata = g_slice_new0 (FlushData);
|
||||
fdata->close_stream = TRUE;
|
||||
|
||||
task = g_task_new (stream, cancellable, callback, data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user