[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 26/73: test643: verify curl_mime_subparts() rejects
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 26/73: test643: verify curl_mime_subparts() rejects cyclic additions. |
Date: |
Tue, 24 Oct 2017 18:54:07 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 70c3ed48ac737ab7fa83600313cf4bd9c2443ee5
Author: Patrick Monnerat <address@hidden>
AuthorDate: Sun Oct 8 19:05:59 2017 +0100
test643: verify curl_mime_subparts() rejects cyclic additions.
---
tests/libtest/lib643.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c
index e26a2515f..7432dfce8 100644
--- a/tests/libtest/lib643.c
+++ b/tests/libtest/lib643.c
@@ -251,6 +251,30 @@ test_cleanup:
return res;
}
+static int cyclic_add(void)
+{
+ CURL *easy = curl_easy_init();
+ curl_mime *mime = curl_mime_init(easy);
+ curl_mimepart *part = curl_mime_addpart(mime);
+ CURLcode a1 = curl_mime_subparts(part, mime);
+
+ if(a1 == CURLE_BAD_FUNCTION_ARGUMENT) {
+ curl_mime *submime = curl_mime_init(easy);
+ curl_mimepart *subpart = curl_mime_addpart(submime);
+
+ curl_mime_subparts(part, submime);
+ a1 = curl_mime_subparts(subpart, mime);
+ }
+
+ curl_mime_free(mime);
+ curl_easy_cleanup(easy);
+ if(a1 != CURLE_BAD_FUNCTION_ARGUMENT)
+ /* that should have failed */
+ return 1;
+
+ return 0;
+}
+
int test(char *URL)
{
int res;
@@ -264,6 +288,9 @@ int test(char *URL)
if(!res)
res = once(URL, FALSE); /* new */
+ if(!res)
+ res = cyclic_add();
+
curl_global_cleanup();
return res;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] branch master updated (dc0683b64 -> 8252aa305), gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 02/73: ftp: UBsan fixup 'pointer index expression overflowed', gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 10/73: openssl: fix build without HAVE_OPAQUE_EVP_PKEY, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 09/73: lib/config-win32.h: let SMB/SMBS be enabled with OpenSSL/NSS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 08/73: build: fix --disable-crypto-auth, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 05/73: lib/Makefile.m32: allow customizing dll suffixes, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 07/73: darwinssl: add support for TLSv1.3, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 03/73: failf: skip the sprintf() if there are no consumers, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 26/73: test643: verify curl_mime_subparts() rejects cyclic additions.,
gnunet <=
- [GNUnet-SVN] [gnurl] 35/73: test298: verify --ftp-method nowcwd with URL encoded path, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 20/73: mime: be tolerant about setting twice the same header list in a part., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 12/73: multi_cleanup: call DONE on handles that never got that, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 01/73: RELEASE-PROCEDURE: update the release schedule, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 14/73: tests: added flaky keyword to tests 587 and 644, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 33/73: CURLOPT_NOPROGRESS.3: also refer to xferinfofunction, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 24/73: mime: avoid resetting a part's encoder when part's contents change., gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 48/73: mime: fix the content reader to handle >16K data properly, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 43/73: HELP-US: the label "PR-welcome" is now renamed to "help wanted", gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 22/73: RELEASE-NOTES: synced with a4c1c75da30af1, gnunet, 2017/10/24