diff options
author | Curl Upstream <curl-library@lists.haxx.se> | 2022-04-27 06:11:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-28 19:15:44 (GMT) |
commit | 2a9bc9ebf09fbafa5378d143083434204e9f233e (patch) | |
tree | d55420489c10068efaa694b96db2f735539b4339 /lib/mime.h | |
parent | a1f6ec647cfab8d613897562f8ee5f81a8f6b68d (diff) | |
download | CMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.zip CMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.tar.gz CMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.tar.bz2 |
curl 2022-04-27 (1669b17d)
Code extracted from:
https://github.com/curl/curl.git
at commit 1669b17d3a1a1fd824308544ca0ec02a2a4f50ea (curl-7_83_0).
Diffstat (limited to 'lib/mime.h')
-rw-r--r-- | lib/mime.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,6 +24,7 @@ #include "curl_setup.h" +#define MIME_BOUNDARY_DASHES 24 /* leading boundary dashes */ #define MIME_RAND_BOUNDARY_CHARS 16 /* Nb. of random boundary chars. */ #define MAX_ENCODED_LINE_LENGTH 76 /* Maximum encoded line length. */ #define ENCODING_BUFFER_SIZE 256 /* Encoding temp buffers size. */ @@ -91,8 +92,8 @@ struct mime_state { curl_off_t offset; /* State-dependent offset. */ }; -/* minimum buffer size for the boundary string */ -#define MIME_BOUNDARY_LEN (24 + MIME_RAND_BOUNDARY_CHARS + 1) +/* Boundary string length. */ +#define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS) /* A mime multipart. */ struct curl_mime { @@ -100,7 +101,7 @@ struct curl_mime { curl_mimepart *parent; /* Parent part. */ curl_mimepart *firstpart; /* First part. */ curl_mimepart *lastpart; /* Last part. */ - char boundary[MIME_BOUNDARY_LEN]; /* The part boundary. */ + char boundary[MIME_BOUNDARY_LEN + 1]; /* The part boundary. */ struct mime_state state; /* Current readback state. */ }; |