~ubuntu-branches/ubuntu/oneiric/python2.5/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2008-1679.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-10-05 09:36:15 UTC
  • mfrom: (5.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081005093615-bscek03gj1xxe5bs
Tags: 2.5.2-11.1ubuntu1
* Update to 20081004, taken from the 2.5 release branch.
  - debian/patches/CVE-2008-2316: Remove, applied upstream.
  - debian/patches/CVE-2008-1679: Remove, applied upstream.
* idle: Add version information to menu entry. LP: #209507.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
 
3
 
# DP: CVE-2007-4965
4
 
 
5
 
dir=
6
 
if [ $# -eq 3 -a "$2" = '-d' ]; then
7
 
    pdir="-d $3"
8
 
    dir="$3/"
9
 
elif [ $# -ne 1 ]; then
10
 
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
11
 
    exit 1
12
 
fi
13
 
case "$1" in
14
 
    -patch)
15
 
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
16
 
        ;;
17
 
    -unpatch)
18
 
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
19
 
        ;;
20
 
    *)
21
 
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
22
 
        exit 1
23
 
esac
24
 
exit 0
25
 
 
26
 
--- Modules/imageop.c   2008-04-07 16:13:42.000000000 -0700
27
 
+++ Modules/imageop.c   2008-04-07 16:10:21.000000000 -0700
28
 
@@ -640,6 +640,11 @@
29
 
                PyErr_SetString(ImageopError, "String has incorrect length");
30
 
                return 0;
31
 
        }
32
 
+       
33
 
+       if ( nlen / x != y || nlen > INT_MAX / 4) {
34
 
+               PyErr_SetString(ImageopError, "Image is too large");
35
 
+               return 0;
36
 
+       }
37
 
     
38
 
        rv = PyString_FromStringAndSize(NULL, nlen*4);
39
 
        if ( rv == 0 )
40
 
@@ -743,6 +748,11 @@
41
 
                PyErr_SetString(ImageopError, "String has incorrect length");
42
 
                return 0;
43
 
        }
44
 
+       
45
 
+       if ( nlen / x != y || nlen > INT_MAX / 4) {
46
 
+               PyErr_SetString(ImageopError, "Image is too large");
47
 
+               return 0;
48
 
+       }
49
 
     
50
 
        rv = PyString_FromStringAndSize(NULL, nlen*4);
51
 
        if ( rv == 0 )