~ubuntu-branches/ubuntu/utopic/curl/utopic-updates

« back to all changes in this revision

Viewing changes to lib/formdata.c

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-04-30 13:34:14 UTC
  • mfrom: (76.1.1 utopic)
  • Revision ID: package-import@ubuntu.com-20140430133414-lal4vsnldlvsue7n
* Merge from Debian unstable.  Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2014, 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
1110
1110
 
1111
1111
    /* filename need be escaped */
1112
1112
    filename_escaped = malloc(strlen(filename)*2+1);
1113
 
    if(!filename_escaped)
 
1113
    if(!filename_escaped) {
 
1114
      Curl_safefree(filebasename);
1114
1115
      return CURLE_OUT_OF_MEMORY;
 
1116
    }
1115
1117
    p0 = filename_escaped;
1116
1118
    p1 = filename;
1117
1119
    while(*p1) {
1227
1229
      }
1228
1230
 
1229
1231
      result = AddFormDataf(&form, &size,
1230
 
                            "\r\nContent-Type: multipart/mixed,"
 
1232
                            "\r\nContent-Type: multipart/mixed;"
1231
1233
                            " boundary=%s\r\n",
1232
1234
                            fileboundary);
1233
1235
      if(result)