[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 111/205: curl: check for end of input in writeout b
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 111/205: curl: check for end of input in writeout backslash handling |
Date: |
Thu, 20 Apr 2017 16:20:51 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit 8e65877870c1fac920b65219adec720df810aab9
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Mar 24 10:14:21 2017 +0100
curl: check for end of input in writeout backslash handling
Reported-by: Brian Carpenter
Added test 1442 to verify
---
src/tool_writeout.c | 4 ++--
tests/data/Makefile.inc | 2 +-
tests/data/test1442 | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
index 7843182f2..5d92bd278 100644
--- a/src/tool_writeout.c
+++ b/src/tool_writeout.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -341,7 +341,7 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const
char *writeinfo)
}
}
}
- else if('\\' == *ptr) {
+ else if('\\' == *ptr && ptr[1]) {
switch(ptr[1]) {
case 'r':
fputc('\r', stream);
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index a6a06b81f..edeb9000c 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -153,7 +153,7 @@ test1408 test1409 test1410 test1411 test1412 test1413
test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
test1424 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
-test1436 test1437 test1438 test1439 test1440 test1441 \
+test1436 test1437 test1438 test1439 test1440 test1441 test1442 \
\
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
diff --git a/tests/data/test1442 b/tests/data/test1442
new file mode 100644
index 000000000..255a4c9ff
--- /dev/null
+++ b/tests/data/test1442
@@ -0,0 +1,35 @@
+<testcase>
+<info>
+<keywords>
+--write-out
+FILE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+file
+</server>
+
+<name>
+Check --write-out with trailing \
+</name>
+<command>
+file://localhost/%PWD/log/non-existent-file.txt --write-out '\'
+</command>
+</client>
+
+# Verify data
+<verify>
+<errorcode>
+37
+</errorcode>
+<stdout nonewline="yes">
+\
+</stdout>
+</verify>
+</testcase>
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 68/205: mbedtls: fix typo in variable name, (continued)
- [GNUnet-SVN] [gnurl] 68/205: mbedtls: fix typo in variable name, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 198/205: openssl: make SSL_ERROR_to_str more future-proof, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 178/205: libcurl-thread.3: also mention threaded-resolver, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 145/205: docs: added examples for CURLINFO_FILETIME.3 and CURLOPT_FILETIME.3, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 156/205: tool: fix Windows Unicode build, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 59/205: openssl: add two /* FALLTHROUGH */ to satisfy coverity, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 99/205: mbedtls: add support for CURLOPT_SSL_CTX_FUNCTION, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 203/205: RELEASE-NOTES: curl 7.54.0, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 112/205: spelling fixes, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 93/205: RELEASE-NOTES: synced with 6e0f26c8a8c28df, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 111/205: curl: check for end of input in writeout backslash handling,
gnunet <=
- [GNUnet-SVN] [gnurl] 163/205: test1541: ignore the curl_off_t variable type name comparison, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 107/205: openssl: made the error table static const, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 151/205: llist: replace Curl_llist_alloc with Curl_llist_init, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 164/205: INSTALL.cmake: more problems, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 133/205: gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context], gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 148/205: include: curl/system.h is a run-time version of curlbuild.h, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 160/205: tool_operate: move filetime code to its own function, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 170/205: sspi: print out InitializeSecurityContext() error message, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 180/205: RELEASE-NOTES: synced with f9d1e9a27f7e1, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 162/205: Revert "configure: prefer 'long long' to int64_t for curl_off_t", gnunet, 2017/04/20