[tracker] libtracker-data: Check g_input_stream_read() return value
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Check g_input_stream_read() return value
- Date: Wed, 14 Dec 2016 19:44:07 +0000 (UTC)
commit f071e0c99c3d7de4a901f80006368360c1c75611
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 14 19:52:45 2016 +0100
libtracker-data: Check g_input_stream_read() return value
And error out if it fails.
src/libtracker-data/tracker-db-journal.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index c397c4f..d544abf 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -247,7 +247,9 @@ journal_read_string (JournalReader *jreader,
}
result = g_malloc (found_pos + 1);
- g_input_stream_read (G_INPUT_STREAM (bstream), result, found_pos + 1, NULL, NULL);
+
+ if (g_input_stream_read (G_INPUT_STREAM (bstream), result, found_pos + 1, NULL, error) < 0)
+ return NULL;
} else {
gsize str_length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]