Updated to Git v1.8.4
[msysgit.git] / src / curl / patches / 0003-curl-treat-.netrc-files-as-text-when-opening-to-hand.patch
blob1eeb026f37f0abb3a5bf4b6145a59800ea1568da
1 From bf33f627cf7d02d2a52ff35467ed03b4df65dd1b Mon Sep 17 00:00:00 2001
2 From: Pat Thoyts <patthoyts@users.sourceforge.net>
3 Date: Fri, 10 Sep 2010 10:40:03 +0100
4 Subject: [PATCH 3/3] curl: treat .netrc files as text when opening to handle
5 line endings
7 The .netrc file may well use CRLF on Windows and should be opened using
8 text mode to avoid reading in the CR as part of the authentication data.
10 Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
11 ---
12 lib/netrc.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
15 diff --git a/lib/netrc.c b/lib/netrc.c
16 index 2c5942a..9228134 100644
17 --- a/lib/netrc.c
18 +++ b/lib/netrc.c
19 @@ -97,7 +97,7 @@ int Curl_parsenetrc(const char *host,
20 netrc_alloc = TRUE;
23 - file = fopen(netrcfile, "r");
24 + file = fopen(netrcfile, "rt");
25 if(file) {
26 char *tok;
27 char *tok_buf;
28 --
29 1.8.1.msysgit.1