tracker/tracker-extract-pdf-crash-fix.patch
2012-02-27 16:57:14 -05:00

12 lines
485 B
Diff

--- src/tracker-extract/tracker-extract-pdf.c 2012-02-15 10:19:19.000000000 -0500
+++ src/tracker-extract/tracker-extract-pdf.c.new 2012-02-27 16:34:11.407153064 -0500
@@ -451,7 +451,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));