[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 45/150: getdate: return -1 for out of range
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 45/150: getdate: return -1 for out of range |
Date: |
Fri, 30 Mar 2018 16:48:19 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a19afaccfeb5a77c15fdfc1c2be16fb27828cefc
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Feb 1 22:23:20 2018 +0100
getdate: return -1 for out of range
...as that's how the function is documented to work.
Reported-by: Michael Kaufmann
Bug found in an autobuild with 32 bit time_t
Closes #2278
---
lib/parsedate.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lib/parsedate.c b/lib/parsedate.c
index beaa1bbd5..23a787fc9 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -561,14 +561,10 @@ time_t curl_getdate(const char *p, const time_t *now)
int rc = parsedate(p, &parsed);
(void)now; /* legacy argument from the past that we ignore */
- switch(rc) {
- case PARSEDATE_OK:
+ if(rc == PARSEDATE_OK) {
if(parsed == -1)
/* avoid returning -1 for a working scenario */
parsed++;
- /* fallthrough */
- case PARSEDATE_LATER:
- case PARSEDATE_SOONER:
return parsed;
}
/* everything else is fail */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 29/150: curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6, (continued)
- [GNUnet-SVN] [gnurl] 29/150: curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 10/150: openssl: fix pinned public key build error in FIPS mode, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 38/150: fnmatch: do not match the empty string with a character set, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 18/150: docs: fix typos in man pages, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 19/150: KNOWN_BUGS: DICT responses show the underlying protocol, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 20/150: TODO: UTF-8 filenames in Content-Disposition, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 22/150: build: open VC15 projects with VS 2017, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 24/150: configure: set PATH_SEPARATOR to colon for PATH w/o separator, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 26/150: winbuild: make linker generate proper PDB, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 21/150: RELEASE-NOTES: synced with 094647fca, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 45/150: getdate: return -1 for out of range,
gnunet <=
- [GNUnet-SVN] [gnurl] 30/150: curlver: next release will be 7.59.0, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 40/150: fnmatch: pattern syntax can no longer fail, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 51/150: build-openssl.bat/build-wolfssl.bat: Build platform is optional, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 25/150: curl: add --proxy-pinnedpubkey, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 31/150: RELEASE-NOTES: synced with 811beab9f, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 55/150: build-openssl.bat: Fixed incorrect move if destination build folder exists, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 78/150: travis: add build with iconv enabled, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 23/150: curl_ctype: private is*() type macros and functions, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 59/150: get_posix_time: only check for overflows if they can happen!, gnunet, 2018/03/30
- [GNUnet-SVN] [gnurl] 64/150: smtp: fix processing of initial dot in data, gnunet, 2018/03/30