0001-replace-deprecated-index-by-strchr-51385.patch
lasso/xml/tools.c | ||
---|---|---|
2504 | 2504 |
list = ""; |
2505 | 2505 | |
2506 | 2506 |
for (fp = from; *fp; fp++) { |
2507 |
if (isalnum(*fp) || index("._~-", *fp) || index(list, *fp))
|
|
2507 |
if (isalnum(*fp) || strchr("._~-", *fp) || strchr(list, *fp))
|
|
2508 | 2508 |
len++; |
2509 | 2509 |
else |
2510 | 2510 |
len += 3; |
... | ... | |
2514 | 2514 |
ri = 0; |
2515 | 2515 | |
2516 | 2516 |
for (fp = from; *fp; fp++) { |
2517 |
if (isalnum(*fp) || index("._~-", *fp) || index(list, *fp)) {
|
|
2517 |
if (isalnum(*fp) || strchr("._~-", *fp) || strchr(list, *fp)) {
|
|
2518 | 2518 |
result[ri++] = *fp; |
2519 | 2519 |
} else { |
2520 | 2520 |
int msb = (*fp & 0xf0) >> 4; |
tests/basic_tests.c | ||
---|---|---|
22 | 22 | |
23 | 23 |
#include <stdlib.h> |
24 | 24 |
#include <string.h> |
25 |
#include <strings.h> |
|
26 | 25 | |
27 | 26 |
#include <check.h> |
28 | 27 | |
... | ... | |
2128 | 2127 |
lasso_assign_string(request->ProtocolBinding, LASSO_SAML2_METADATA_BINDING_POST); |
2129 | 2128 |
check_good_rc(lasso_login_build_authn_request_msg(spLoginContext)); |
2130 | 2129 |
authnRequestUrl = LASSO_PROFILE(spLoginContext)->msg_url; |
2131 |
qs = index(authnRequestUrl, '?') + 1;
|
|
2130 |
qs = strchr(authnRequestUrl, '?') + 1;
|
|
2132 | 2131 |
issuer = lasso_profile_get_issuer(qs); |
2133 | 2132 |
check_true(lasso_strisequal(issuer, "http://sp5/metadata")); |
2134 | 2133 |
lasso_release_string(issuer); |
2135 |
- |