~ubuntu-branches/ubuntu/quantal/apache2/quantal

« back to all changes in this revision

Viewing changes to debian/patches/085_CVE-2011-3607.dpatch

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-09 05:20:43 UTC
  • mfrom: (14.3.31 sid)
  • Revision ID: package-import@ubuntu.com-20111209052043-ueqp28b9fconxxg1
Tags: 2.2.21-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  - debian/{control, rules}: Enable PIE hardening.
  - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
  - debian/control: Add bzr tag and point it to our tree
  - debian/apache2.py, debian/apache2.2-common.install: Add apport hook.
  - debian/control, debian/ask-for-passphrase, debian/config-dir/mods-available/ssl.conf:
    Plymouth aware passphrase dialog program ask-for-passphrase.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 085_CVE-2011-3607.dpatch by Stefan Fritsch <sf@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Fix integer overflow, based on upstream r1198940
 
6
 
 
7
@DPATCH@
 
8
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' trunk~/server/util.c trunk/server/util.c
 
9
--- trunk~/server/util.c        2011-05-19 04:17:37.000000000 +0200
 
10
+++ trunk/server/util.c 2011-12-03 18:46:39.875941529 +0100
 
11
@@ -366,7 +366,7 @@
 
12
     char *dest, *dst;
 
13
     char c;
 
14
     size_t no;
 
15
-    int len;
 
16
+    apr_size_t len;
 
17
 
 
18
     if (!source)
 
19
         return NULL;
 
20
@@ -391,6 +391,8 @@
 
21
             len++;
 
22
         }
 
23
         else if (no < nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
 
24
+            if (APR_SIZE_MAX - len <= pmatch[no].rm_eo - pmatch[no].rm_so)
 
25
+                return APR_ENOMEM;
 
26
             len += pmatch[no].rm_eo - pmatch[no].rm_so;
 
27
         }
 
28