~ubuntu-branches/ubuntu/vivid/logrotate/vivid

« back to all changes in this revision

Viewing changes to debian/patches/rh-toolarge.patch

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-01-03 19:08:07 UTC
  • Revision ID: james.westby@ubuntu.com-20090103190807-1xugux23gsmoh3xh
Tags: 3.7.7-2ubuntu1
* Merge from debian unstable, remaining changes: LP: #313461
  - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on
    request, and we don't configure an MTA by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: logrotate-3.7.7/config.c
 
2
===================================================================
 
3
--- logrotate-3.7.7.orig/config.c       2008-12-17 13:00:30.459635419 +0000
 
4
+++ logrotate-3.7.7/config.c    2008-12-17 13:02:16.759636225 +0000
 
5
@@ -536,6 +536,13 @@
 
6
 
 
7
     length = sb.st_size;
 
8
 
 
9
+    if (length > 0xffffff) {
 
10
+        message(MESS_ERROR, "file %s too large, probably not a config file.\n",
 
11
+                configFile);
 
12
+        close(fd);
 
13
+        return 1;
 
14
+    }    
 
15
+
 
16
     buf = alloca(length + 2);
 
17
     if (!buf) {
 
18
        message(MESS_ERROR, "alloca() of %d bytes failed\n", (int) length);