[tracker] tracker-extract: Check string length before parsing XMP in the PDF extractor
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Check string length before parsing XMP in the PDF extractor
- Date: Mon, 14 Mar 2016 22:27:49 +0000 (UTC)
commit e877ac542caebe096db86ff6e370d3d1ee40a737
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 14 01:07:53 2016 +0100
tracker-extract: Check string length before parsing XMP in the PDF extractor
tracker_xmp_new() may warn if we're given an empty string here.
src/tracker-extract/tracker-extract-pdf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index 6e2fef7..b750678 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -415,7 +415,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
keywords = g_ptr_array_new ();
- if (xml &&
+ if (xml && *xml &&
(xd = tracker_xmp_new (xml, strlen (xml), uri)) != NULL) {
/* The casts here are well understood and known */
md.title = (gchar *) tracker_coalesce_strip (4, pd.title, xd->title, xd->title2,
xd->pdf_title);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]