[libgsf] OLE2: Fix another seek error check.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] OLE2: Fix another seek error check.
- Date: Tue, 7 Jul 2015 13:39:19 +0000 (UTC)
commit 27fab85cfd5e3f7709232f6850a46f6ca62e6eb0
Author: Morten Welinder <terra gnome org>
Date: Tue Jul 7 09:39:00 2015 -0400
OLE2: Fix another seek error check.
ChangeLog | 4 ++++
gsf/gsf-infile-msole.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 92d8ba4..5e37062 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-07 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-infile-msole.c (ole_seek_block): Fix seek error check.
+
2015-07-06 Morten Welinder <terra gnome org>
* gsf/gsf-infile-msole.c (ole_init_info): Add debug code.
diff --git a/gsf/gsf-infile-msole.c b/gsf/gsf-infile-msole.c
index 400e0bb..a618246 100644
--- a/gsf/gsf-infile-msole.c
+++ b/gsf/gsf-infile-msole.c
@@ -102,6 +102,7 @@ static GsfInput *gsf_infile_msole_new_child (GsfInfileMSOle *parent,
MSOleDirent *dirent, GError **err);
static void ole_info_unref (MSOleInfo *info);
+/* Returns FALSE on error. */
static gboolean
ole_seek_block (GsfInfileMSOle const *ole, guint32 block, gsf_off_t offset)
{
@@ -111,7 +112,7 @@ ole_seek_block (GsfInfileMSOle const *ole, guint32 block, gsf_off_t offset)
* header is padded out to bb.size (sector size) when bb.size > 512. */
if (gsf_input_seek (ole->input,
(gsf_off_t)(MAX (OLE_HEADER_SIZE, ole->info->bb.size) + (block << ole->info->bb.shift)) +
offset,
- G_SEEK_SET) < 0)
+ G_SEEK_SET))
return FALSE;
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]