[monitoring-plugins] updated bundled version of uriparser to 0.8.5

Andreas Baumann git at monitoring-plugins.org
Thu May 31 15:40:16 CEST 2018


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: 3b6cde1cc05e4b36bf8053fc55383baa34954291
 Author: Andreas Baumann <mail at andreasbaumann.cc>
   Date: Thu May 31 15:32:09 2018 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=3b6cde1

updated bundled version of uriparser to 0.8.5

---

 ACKNOWLEDGEMENTS                     |  2 +-
 plugins/uriparser/Uri.h              | 10 ++++++----
 plugins/uriparser/UriBase.h          |  4 ++--
 plugins/uriparser/UriCommon.c        |  2 +-
 plugins/uriparser/UriCompare.c       |  2 +-
 plugins/uriparser/UriDefsAnsi.h      |  2 +-
 plugins/uriparser/UriDefsConfig.h    |  4 ++--
 plugins/uriparser/UriDefsUnicode.h   |  2 +-
 plugins/uriparser/UriEscape.c        |  2 +-
 plugins/uriparser/UriFile.c          |  4 ++--
 plugins/uriparser/UriIp4.c           |  2 +-
 plugins/uriparser/UriIp4.h           |  2 +-
 plugins/uriparser/UriIp4Base.c       |  2 +-
 plugins/uriparser/UriNormalize.c     |  4 ++--
 plugins/uriparser/UriNormalizeBase.c |  2 +-
 plugins/uriparser/UriParse.c         | 10 +++++-----
 plugins/uriparser/UriParseBase.c     |  2 +-
 plugins/uriparser/UriQuery.c         |  2 +-
 plugins/uriparser/UriRecompose.c     |  2 +-
 plugins/uriparser/UriResolve.c       |  6 ++++--
 plugins/uriparser/UriShorten.c       |  4 ++--
 21 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/ACKNOWLEDGEMENTS b/ACKNOWLEDGEMENTS
index 06e84e2..a8c4ba0 100644
--- a/ACKNOWLEDGEMENTS
+++ b/ACKNOWLEDGEMENTS
@@ -39,7 +39,7 @@ https://github.com/h2o/picohttpparser
 Use of the library for HTTP header parsing in check_curl.
 
 Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
-Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
 All rights reserved.
 uriparser - RFC 3986 URI parsing library
 http://uriparser.sourceforge.net/
diff --git a/plugins/uriparser/Uri.h b/plugins/uriparser/Uri.h
index 4a18580..a3f7914 100644
--- a/plugins/uriparser/Uri.h
+++ b/plugins/uriparser/Uri.h
@@ -1,8 +1,9 @@
-/*
+/* f9ca23a99fc1c8ff610e2bdc0bff3c4bb4d883ccbff5851fe7a1398f9b6aca57 (0.8.5+)
+ *
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -157,7 +158,8 @@ typedef struct URI_TYPE(UriStruct) {
 	URI_TYPE(PathSegment) * pathTail; /**< Tail of the list behind pathHead */
 	URI_TYPE(TextRange) query; /**< Query without leading "?" */
 	URI_TYPE(TextRange) fragment; /**< Query without leading "#" */
-	UriBool absolutePath; /**< Absolute path flag, distincting "a" and "/a" */
+	UriBool absolutePath; /**< Absolute path flag, distincting "a" and "/a";
+								always <c>URI_FALSE</c> for URIs with host */
 	UriBool owner; /**< Memory owner flag */
 
 	void * reserved; /**< Reserved to the parser */
@@ -567,7 +569,7 @@ int URI_FUNC(UriStringToUnixFilename)(const URI_CHAR * uriString,
 
 /**
  * Extracts a Windows filename from a %URI string.
- * The destination buffer must be large enough to hold len(uriString) + 1 - 8
+ * The destination buffer must be large enough to hold len(uriString) + 1 - 5
  * characters in case of an absolute %URI or len(uriString) + 1 in case
  * of a relative %URI.
  *
diff --git a/plugins/uriparser/UriBase.h b/plugins/uriparser/UriBase.h
index bc63b05..45ba5ab 100644
--- a/plugins/uriparser/UriBase.h
+++ b/plugins/uriparser/UriBase.h
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -55,7 +55,7 @@
 /* Version */
 #define URI_VER_MAJOR           0
 #define URI_VER_MINOR           8
-#define URI_VER_RELEASE         4
+#define URI_VER_RELEASE         5
 #define URI_VER_SUFFIX_ANSI     ""
 #define URI_VER_SUFFIX_UNICODE  URI_ANSI_TO_UNICODE(URI_VER_SUFFIX_ANSI)
 
diff --git a/plugins/uriparser/UriCommon.c b/plugins/uriparser/UriCommon.c
index 37d6b39..571d6d4 100644
--- a/plugins/uriparser/UriCommon.c
+++ b/plugins/uriparser/UriCommon.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriCompare.c b/plugins/uriparser/UriCompare.c
index 6896f64..35f5a13 100644
--- a/plugins/uriparser/UriCompare.c
+++ b/plugins/uriparser/UriCompare.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriDefsAnsi.h b/plugins/uriparser/UriDefsAnsi.h
index deaefaa..d6dbcad 100644
--- a/plugins/uriparser/UriDefsAnsi.h
+++ b/plugins/uriparser/UriDefsAnsi.h
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriDefsConfig.h b/plugins/uriparser/UriDefsConfig.h
index d87ccb6..9f7ac65 100644
--- a/plugins/uriparser/UriDefsConfig.h
+++ b/plugins/uriparser/UriDefsConfig.h
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -88,7 +88,7 @@
 /* http://predef.sourceforge.net/precomp.html#sec32 */
 /* http://msdn2.microsoft.com/en-us/library/ms882281.aspx */
 # define URI_INLINE __forceinline
-#elif (__STDC_VERSION__ >= 199901L)
+#elif (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
 /* C99, "inline" is a keyword */
 # define URI_INLINE inline
 #else
diff --git a/plugins/uriparser/UriDefsUnicode.h b/plugins/uriparser/UriDefsUnicode.h
index fa4befc..8bb8bc2 100644
--- a/plugins/uriparser/UriDefsUnicode.h
+++ b/plugins/uriparser/UriDefsUnicode.h
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriEscape.c b/plugins/uriparser/UriEscape.c
index 79ee3a6..17f8bad 100644
--- a/plugins/uriparser/UriEscape.c
+++ b/plugins/uriparser/UriEscape.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriFile.c b/plugins/uriparser/UriFile.c
index 9cf788f..332f6a9 100644
--- a/plugins/uriparser/UriFile.c
+++ b/plugins/uriparser/UriFile.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ static URI_INLINE int URI_FUNC(FilenameToUriString)(const URI_CHAR * filename,
 	is_windows_network = (filename[0] == _UT('\\')) && (filename[1] == _UT('\\'));
 	absolute = fromUnix
 			? (filename[0] == _UT('/'))
-			: ((filename[0] != _UT('\0')) && (filename[1] == _UT(':'))
+			: (((filename[0] != _UT('\0')) && (filename[1] == _UT(':')))
 				|| is_windows_network);
 
 	if (absolute) {
diff --git a/plugins/uriparser/UriIp4.c b/plugins/uriparser/UriIp4.c
index c00910b..ee067d3 100644
--- a/plugins/uriparser/UriIp4.c
+++ b/plugins/uriparser/UriIp4.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriIp4.h b/plugins/uriparser/UriIp4.h
index 885a35c..9251c49 100644
--- a/plugins/uriparser/UriIp4.h
+++ b/plugins/uriparser/UriIp4.h
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriIp4Base.c b/plugins/uriparser/UriIp4Base.c
index 5cd298f..f066246 100644
--- a/plugins/uriparser/UriIp4Base.c
+++ b/plugins/uriparser/UriIp4Base.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriNormalize.c b/plugins/uriparser/UriNormalize.c
index 49db9ff..d68c371 100644
--- a/plugins/uriparser/UriNormalize.c
+++ b/plugins/uriparser/UriNormalize.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -434,8 +434,8 @@ static URI_INLINE UriBool URI_FUNC(MakeOwner)(URI_TYPE(Uri) * uri,
 							&& (ranger->text.afterLast != NULL)
 							&& (ranger->text.afterLast > ranger->text.first)) {
 						free((URI_CHAR *)ranger->text.first);
-						free(ranger);
 					}
+					free(ranger);
 					ranger = next;
 				}
 
diff --git a/plugins/uriparser/UriNormalizeBase.c b/plugins/uriparser/UriNormalizeBase.c
index bac5888..8dbe7fd 100644
--- a/plugins/uriparser/UriNormalizeBase.c
+++ b/plugins/uriparser/UriNormalizeBase.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriParse.c b/plugins/uriparser/UriParse.c
index e3cdc68..5eee16d 100644
--- a/plugins/uriparser/UriParse.c
+++ b/plugins/uriparser/UriParse.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -193,7 +193,7 @@ static UriBool URI_FUNC(OnExitOwnPortUserInfo)(URI_TYPE(ParserState) * state, co
 static UriBool URI_FUNC(OnExitSegmentNzNcOrScheme2)(URI_TYPE(ParserState) * state, const URI_CHAR * first);
 static void URI_FUNC(OnExitPartHelperTwo)(URI_TYPE(ParserState) * state);
 
-static void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state);
+static void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state);
 
 static UriBool URI_FUNC(PushPathSegment)(URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast);
 
@@ -2022,7 +2022,7 @@ static const URI_CHAR * URI_FUNC(ParseZeroMoreSlashSegs)(URI_TYPE(ParserState) *
 
 
 
-static URI_INLINE void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state) {
+static URI_INLINE void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state) {
 	URI_TYPE(Uri) * const uriBackup = state->uri;
 	memset(state, 0, sizeof(URI_TYPE(ParserState)));
 	state->uri = uriBackup;
@@ -2071,7 +2071,7 @@ int URI_FUNC(ParseUriEx)(URI_TYPE(ParserState) * state, const URI_CHAR * first,
 	uri = state->uri;
 
 	/* Init parser */
-	URI_FUNC(ResetParserState)(state);
+	URI_FUNC(ResetParserStateExceptUri)(state);
 	URI_FUNC(ResetUri)(uri);
 
 	/* Parse */
@@ -2211,9 +2211,9 @@ UriBool URI_FUNC(_TESTING_ONLY_ParseIpSix)(const URI_CHAR * text) {
 	const URI_CHAR * const afterIpSix = text + URI_STRLEN(text);
 	const URI_CHAR * res;
 
-	URI_FUNC(ResetParserState)(&parser);
 	URI_FUNC(ResetUri)(&uri);
 	parser.uri = &uri;
+	URI_FUNC(ResetParserStateExceptUri)(&parser);
 	parser.uri->hostData.ip6 = malloc(1 * sizeof(UriIp6));
 	res = URI_FUNC(ParseIPv6address2)(&parser, text, afterIpSix);
 	URI_FUNC(FreeUriMembers)(&uri);
diff --git a/plugins/uriparser/UriParseBase.c b/plugins/uriparser/UriParseBase.c
index 75e4761..1d4ef6e 100644
--- a/plugins/uriparser/UriParseBase.c
+++ b/plugins/uriparser/UriParseBase.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriQuery.c b/plugins/uriparser/UriQuery.c
index 7adb073..f0cd4f8 100644
--- a/plugins/uriparser/UriQuery.c
+++ b/plugins/uriparser/UriQuery.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriRecompose.c b/plugins/uriparser/UriRecompose.c
index 09daee0..9678aac 100644
--- a/plugins/uriparser/UriRecompose.c
+++ b/plugins/uriparser/UriRecompose.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
diff --git a/plugins/uriparser/UriResolve.c b/plugins/uriparser/UriResolve.c
index 3660b6b..bb1d21a 100644
--- a/plugins/uriparser/UriResolve.c
+++ b/plugins/uriparser/UriResolve.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -152,6 +152,8 @@ static int URI_FUNC(AddBaseUriImpl)(URI_TYPE(Uri) * absDest,
 		const URI_TYPE(Uri) * relSource,
 		const URI_TYPE(Uri) * absBase,
 		UriResolutionOptions options) {
+	UriBool relSourceHasScheme;
+
 	if (absDest == NULL) {
 		return URI_ERROR_NULL;
 	}
@@ -169,7 +171,7 @@ static int URI_FUNC(AddBaseUriImpl)(URI_TYPE(Uri) * absDest,
 	/* [00/32] 	-- A non-strict parser may ignore a scheme in the reference */
 	/* [00/32] 	-- if it is identical to the base URI's scheme. */
 	/* [00/32] 	if ((not strict) and (R.scheme == Base.scheme)) then */
-	UriBool relSourceHasScheme = (relSource->scheme.first != NULL) ? URI_TRUE : URI_FALSE;
+	relSourceHasScheme = (relSource->scheme.first != NULL) ? URI_TRUE : URI_FALSE;
 	if ((options & URI_RESOLVE_IDENTICAL_SCHEME_COMPAT)
 			&& (absBase->scheme.first != NULL)
 			&& (relSource->scheme.first != NULL)
diff --git a/plugins/uriparser/UriShorten.c b/plugins/uriparser/UriShorten.c
index c839ae5..0145f68 100644
--- a/plugins/uriparser/UriShorten.c
+++ b/plugins/uriparser/UriShorten.c
@@ -2,7 +2,7 @@
  * uriparser - RFC 3986 URI parsing library
  *
  * Copyright (C) 2007, Weijia Song <songweijia at gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster at hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian at pipping.org>
  * All rights reserved.
  *
  * Redistribution  and use in source and binary forms, with or without
@@ -131,7 +131,7 @@ static URI_INLINE UriBool URI_FUNC(EqualsAuthority)(const URI_TYPE(Uri) * first,
 
 
 
-int URI_FUNC(RemoveBaseUriImpl)(URI_TYPE(Uri) * dest,
+static int URI_FUNC(RemoveBaseUriImpl)(URI_TYPE(Uri) * dest,
 		const URI_TYPE(Uri) * absSource,
 		const URI_TYPE(Uri) * absBase,
 		UriBool domainRootMode) {



More information about the Commits mailing list