[tracker/tracker-1.2] tracker-extract: Fix possible invalid memory read/write
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.2] tracker-extract: Fix possible invalid memory read/write
- Date: Wed, 10 Dec 2014 11:29:27 +0000 (UTC)
commit 68a76be27bc28bdfd3a5f4cf00fb51eb0ecb04b1
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Nov 30 12:39:06 2014 +0100
tracker-extract: Fix possible invalid memory read/write
If length is 0, out of bounds data would be read, and then written.
src/libtracker-extract/tracker-utils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-utils.c b/src/libtracker-extract/tracker-utils.c
index 92a0549..308fb5d 100644
--- a/src/libtracker-extract/tracker-utils.c
+++ b/src/libtracker-extract/tracker-utils.c
@@ -936,7 +936,7 @@ tracker_keywords_parse (GPtrArray *store,
}
len = strlen (keywords_d);
- if (keywords_d[len - 1] == '"') {
+ if (len > 0 && keywords_d[len - 1] == '"') {
keywords_d[len - 1] = '\0';
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]