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

« back to all changes in this revision

Viewing changes to lib/formdata.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:
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: formdata.c,v 1.88 2005/05/02 14:33:07 bagder Exp $
 
21
 * $Id: formdata.c,v 1.89 2005/11/24 20:38:20 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
/*
105
105
/* Length of the random boundary string. */
106
106
#define BOUNDARY_LENGTH 40
107
107
 
108
 
#ifndef CURL_DISABLE_HTTP
 
108
#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
109
109
 
110
110
#include <stdio.h>
111
111
#include <stdlib.h>
128
128
/* The last #include file should be: */
129
129
#include "memdebug.h"
130
130
 
 
131
#endif  /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */
 
132
 
 
133
#ifndef CURL_DISABLE_HTTP
 
134
 
131
135
#if defined(HAVE_BASENAME) && defined(NEED_BASENAME_PROTO)
132
136
/* This system has a basename() but no prototype for it! */
133
137
char *basename(char *path);
1511
1515
  return 0;
1512
1516
}
1513
1517
 
1514
 
#endif
 
1518
#endif  /* _FORM_DEBUG */
1515
1519
 
1516
1520
#else  /* CURL_DISABLE_HTTP */
1517
1521
CURLFORMcode curl_formadd(struct curl_httppost **httppost,
1531
1535
 
1532
1536
#endif  /* CURL_DISABLE_HTTP */
1533
1537
 
 
1538
#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
 
1539
 
1534
1540
/*
1535
1541
 * Curl_FormBoundary() creates a suitable boundary string and returns an
1536
1542
 * allocated one. This is also used by SSL-code so it must be present even
1563
1569
 
1564
1570
  return retstring;
1565
1571
}
 
1572
 
 
1573
#endif  /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */