[tracker/tracker-0.8] tracker-extract: jpeg: Bugfix for NB#169105, critical when IPTC data isn't available
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] tracker-extract: jpeg: Bugfix for NB#169105, critical when IPTC data isn't available
- Date: Thu, 20 May 2010 15:30:04 +0000 (UTC)
commit 53318deea62709c9f44a316f13220b2986b15070
Author: Philip Van Hoof <philip codeminded be>
Date: Mon May 17 16:04:56 2010 +0200
tracker-extract: jpeg: Bugfix for NB#169105, critical when IPTC data isn't available
src/tracker-extract/tracker-extract-jpeg.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 816cce1..dd0d4b6 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -240,9 +240,9 @@ extract_jpeg (const gchar *uri,
str = (gchar*) marker->data;
len = marker->data_length;
#ifdef HAVE_LIBIPTCDATA
- if (strncmp (PS3_NAMESPACE, str, PS3_NAMESPACE_LENGTH) == 0) {
+ if (len > 0 && strncmp (PS3_NAMESPACE, str, PS3_NAMESPACE_LENGTH) == 0) {
offset = iptc_jpeg_ps3_find_iptc (str, len, &sublen);
- if (offset > 0) {
+ if (offset > 0 && sublen > 0) {
tracker_iptc_read (str + offset,
sublen,
uri,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]