File: 0140-fix_pdf_xref.patch

package info (click to toggle)
xsane 0.999-12.2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 22,636 kB
  • sloc: ansic: 46,243; makefile: 722; sh: 383; sed: 50
file content (20 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix xref table generation
 Mark non-existent objects as free in the xref table.
Author: Julien BLACHE <jblache@debian.org>
Forwarded: yes

Index: xsane-0.998/src/xsane-multipage-project.c
===================================================================
--- xsane-0.998.orig/src/xsane-multipage-project.c	2010-11-16 21:25:50.000000000 +0100
+++ xsane-0.998/src/xsane-multipage-project.c	2011-02-04 19:50:53.929016002 +0100
@@ -973,6 +973,10 @@
     else if (output_format == XSANE_PDF)
     {
       xsane_save_pdf_create_document_header(outfile, &xref, pages, preferences.save_pdf_flatedecoded);
+
+      /* Objects 4 and 5 are unused and do not exist */
+      xref.obj[4] = 0;
+      xref.obj[5] = 0;
     }
   }
 #ifdef HAVE_LIBTIFF