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

« back to all changes in this revision

Viewing changes to src/writeout.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2005, 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: writeout.c,v 1.27 2004/12/21 19:59:35 bagder Exp $
 
21
 * $Id: writeout.c,v 1.28 2005/09/06 13:27:18 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
112
112
        char keepit;
113
113
        int i;
114
114
        if(('{' == ptr[1]) && (end=strchr(ptr, '}'))) {
 
115
          bool match = FALSE;
115
116
          ptr+=2; /* pass the % and the { */
116
117
          keepit=*end;
117
118
          *end=0; /* zero terminate */
118
119
          for(i=0; replacements[i].name; i++) {
119
120
            if(curl_strequal(ptr, replacements[i].name)) {
 
121
              match = TRUE;
120
122
              switch(replacements[i].id) {
121
123
              case VAR_EFFECTIVE_URL:
122
124
                if((CURLE_OK ==
217
219
              break;
218
220
            }
219
221
          }
 
222
          if(!match) {
 
223
            fprintf(stderr, "curl: unknown --writeout variable: '%s'\n", ptr);
 
224
          }
220
225
          ptr=end+1; /* pass the end */
221
226
          *end = keepit;
222
227
        }