projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
f9174a9
)
use u_isalnum if available
author
Michael Wallner
<mike@php.net>
Mon, 5 Mar 2018 10:52:49 +0000
(11:52 +0100)
committer
Michael Wallner
<mike@php.net>
Mon, 5 Mar 2018 10:52:49 +0000
(11:52 +0100)
src/php_http_url.c
patch
|
blob
|
history
diff --git
a/src/php_http_url.c
b/src/php_http_url.c
index ad4f14cb87d222c47c227602dd7c418b74d23d10..71ca6e958a52301274b4a6cc9c090d696c0fae72 100644
(file)
--- a/
src/php_http_url.c
+++ b/
src/php_http_url.c
@@
-19,6
+19,7
@@
# include <idn2.h>
#endif
#if PHP_HTTP_HAVE_LIBICU
# include <idn2.h>
#endif
#if PHP_HTTP_HAVE_LIBICU
+# include <unicode/uchar.h>
# include <unicode/uidna.h>
#endif
#if PHP_HTTP_HAVE_LIBIDNKIT || PHP_HTTP_HAVE_LIBIDNKIT2
# include <unicode/uidna.h>
#endif
#if PHP_HTTP_HAVE_LIBIDNKIT || PHP_HTTP_HAVE_LIBIDNKIT2
@@
-742,7
+743,11
@@
static inline size_t parse_mb(struct parse_state *state, parse_mb_what_t what, c
if (what == PARSE_HOSTINFO && (state->flags & PHP_HTTP_URL_PARSE_TOIDN)) {
/* idna */
} else if (state->flags & PHP_HTTP_URL_PARSE_MBUTF8) {
if (what == PARSE_HOSTINFO && (state->flags & PHP_HTTP_URL_PARSE_TOIDN)) {
/* idna */
} else if (state->flags & PHP_HTTP_URL_PARSE_MBUTF8) {
+#if PHP_HTTP_HAVE_LIBICU
+ if (!u_isalnum(wchar)) {
+#else
if (!isualnum(wchar)) {
if (!isualnum(wchar)) {
+#endif
break;
}
#if PHP_HTTP_HAVE_WCHAR
break;
}
#if PHP_HTTP_HAVE_WCHAR