From 5f4cc1f1dafe67b8342dd073b8b203f82f2a5006 Mon Sep 17 00:00:00 2001 From: Deji Akingunola Date: Tue, 13 Dec 2011 23:10:19 -0500 Subject: [PATCH] =?UTF-8?q?Apply=20patch=20to=20fix=20crash=20in=20indexin?= =?UTF-8?q?g=20pdf=20(Fix=20by=20Marek=20Ka=C5=A1=C3=ADk;=20Bug=20#751922)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tracker-extract-pdf-crash-fix.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tracker-extract-pdf-crash-fix.patch diff --git a/tracker-extract-pdf-crash-fix.patch b/tracker-extract-pdf-crash-fix.patch new file mode 100644 index 0000000..17f327b --- /dev/null +++ b/tracker-extract-pdf-crash-fix.patch @@ -0,0 +1,11 @@ +--- src/tracker-extract/tracker-extract-pdf.c 2011-11-25 09:50:33.000000000 -0500 ++++ src/tracker-extract/tracker-extract-pdf.c.new 2011-12-13 22:56:51.251158179 -0500 +@@ -338,7 +338,7 @@ + len = 0; + } else { + contents = (gchar *) mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); +- if (contents == NULL) { ++ if (contents == NULL || contents == MAP_FAILED) { + g_warning ("Could not mmap pdf file '%s': %s\n", + filename, + g_strerror (errno));