summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/mime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/lib/mime.h')
-rw-r--r--Utilities/cmcurl/lib/mime.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/mime.h b/Utilities/cmcurl/lib/mime.h
index 56642ae..f2fc434 100644
--- a/Utilities/cmcurl/lib/mime.h
+++ b/Utilities/cmcurl/lib/mime.h
@@ -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. */
};