~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to lib/content_encoding.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-04-29 11:10:29 UTC
  • mfrom: (3.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090429111029-2j5eiyokfw2bw049
Tags: 7.19.4-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop build dependencies: stunnel, libdb4.6-dev, libssh2-1-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.
  - Call automake-1.9 with --add-missing --copy --force
* drop debian/patches/security_CVE-2009-0037.patch 
  - this patch is part of 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: content_encoding.c,v 1.27 2007-11-24 23:16:55 bagder Exp $
 
21
 * $Id: content_encoding.c,v 1.31 2009-02-17 12:14:52 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
89
89
 
90
90
  /* Dynamically allocate a buffer for decompression because it's uncommonly
91
91
     large to hold on the stack */
92
 
  decomp = (char*)malloc(DSIZ);
 
92
  decomp = malloc(DSIZ);
93
93
  if(decomp == NULL) {
94
94
    return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY);
95
95
  }
133
133
      /* some servers seem to not generate zlib headers, so this is an attempt
134
134
         to fix and continue anyway */
135
135
 
136
 
      (void) inflateEnd(z);     /* don't care about the return code */
 
136
      (void) inflateEnd(z);     /* don't care about the return code */
137
137
      if(inflateInit2(z, -MAX_WBITS) != Z_OK) {
138
 
        return process_zlib_error(conn, z);
 
138
        free(decomp);
 
139
        return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z));
139
140
      }
140
141
      z->next_in = orig_in;
141
142
      z->avail_in = nread;