[tracker] tracker-extract: jpeg: Bugfix for NB#169105, critical when IPTC data isn't available
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: jpeg: Bugfix for NB#169105, critical when IPTC data isn't available
- Date: Mon, 17 May 2010 14:06:33 +0000 (UTC)
commit 3e1da05b40c82fdca4eab70abaf33a6f987540d6
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 0c530f3..3e07c9d 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -238,9 +238,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) {
id = tracker_iptc_new (str + offset, sublen, uri);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]