~ubuntu-branches/ubuntu/lucid/xpdf/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/23_security3.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Andy Price
  • Date: 2007-05-17 22:04:33 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517220433-gzcx2lrvllkbl7mr
Tags: 3.02-1ubuntu1
* Merge from Debian unstable (LP: #113365), remaining changes:
  - Added back 09_xpdfrc_manpage.dpatch (LP #71753)
  - Set Ubuntu maintainer

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 23_security3.dpatch by  <hamish@debian.org>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Red Hat-supplied patch for CAN-2006-0301
6
 
 
7
 
@DPATCH@
8
 
diff -urNad xpdf-3.01~/splash/Splash.cc xpdf-3.01/splash/Splash.cc
9
 
--- xpdf-3.01~/splash/Splash.cc 2006-02-01 20:41:14.000000000 +1100
10
 
+++ xpdf-3.01/splash/Splash.cc  2006-02-01 20:41:41.000000000 +1100
11
 
@@ -931,6 +931,10 @@
12
 
   int alpha2, ialpha2;
13
 
   Guchar t;
14
 
 
15
 
+  if ( (unsigned) x >= (unsigned) bitmap->getWidth() ||
16
 
+       (unsigned) y >= (unsigned) bitmap->getHeight())
17
 
+    return;
18
 
+
19
 
   if (noClip || state->clip->test(x, y)) {
20
 
     if (alpha != 1 || softMask || state->blendFunc) {
21
 
       blendFunc = state->blendFunc ? state->blendFunc : &blendNormal;
22
 
@@ -1198,6 +1202,11 @@
23
 
     updateModY(y);
24
 
   }
25
 
 
26
 
+  if ((unsigned) x0 >= (unsigned) bitmap->getWidth() ||
27
 
+      (unsigned) x1 >= (unsigned) bitmap->getWidth() ||
28
 
+      (unsigned) y >= (unsigned) bitmap->getHeight())
29
 
+    return;
30
 
+
31
 
   if (alpha != 1 || softMask || state->blendFunc) {
32
 
     blendFunc = state->blendFunc ? state->blendFunc : &blendNormal;
33
 
     if (softMask) {
34
 
@@ -1828,6 +1837,11 @@
35
 
     updateModY(y);
36
 
   }
37
 
 
38
 
+  if ((unsigned) x0 >= (unsigned) bitmap->getWidth() ||
39
 
+      (unsigned) x1 >= (unsigned) bitmap->getWidth() ||
40
 
+      (unsigned) y >= (unsigned) bitmap->getHeight())
41
 
+    return;
42
 
+
43
 
   switch (bitmap->mode) {
44
 
   case splashModeMono1:
45
 
     p = &bitmap->data[y * bitmap->rowSize + (x0 >> 3)];