Apply patch to fix crash in indexing pdf (Fix by Marek Kašík; Bug #751922)

This commit is contained in:
Deji Akingunola 2011-12-13 23:10:19 -05:00
parent 0998313006
commit 5f4cc1f1da

View File

@ -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));