[tracker/miner-fs-refactor: 92/127] libtracker-miner: Fix invalid read in TrackerFileSystem
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 92/127] libtracker-miner: Fix invalid read in TrackerFileSystem
- Date: Mon, 5 Dec 2011 13:27:21 +0000 (UTC)
commit 8c0f99b92b9edfbafce765ad38cd47e64a8966ac
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Oct 7 11:31:03 2011 +0200
libtracker-miner: Fix invalid read in TrackerFileSystem
src/libtracker-miner/tracker-file-system.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-system.c b/src/libtracker-miner/tracker-file-system.c
index c770b71..b6168d9 100644
--- a/src/libtracker-miner/tracker-file-system.c
+++ b/src/libtracker-miner/tracker-file-system.c
@@ -156,7 +156,8 @@ file_node_data_equal_or_child (GNode *node,
if (uri_suffix[0] == '/') {
uri_suffix++;
} else if (uri_suffix[0] != '\0' &&
- strcmp (data->uri_suffix + len - 4, ":///") != 0) {
+ (len < 4 ||
+ strcmp (data->uri_suffix + len - 4, ":///") != 0)) {
/* If the first char isn't an uri separator
* nor \0, node represents a similarly named
* file, but not a parent after all.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]