aboutsummaryrefslogtreecommitdiff
path: root/libs/keyutils/patches/020-rindex.patch
blob: 513751839e74867deef20f51844e0202381160a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/key.dns_resolver.c
+++ b/key.dns_resolver.c
@@ -717,12 +717,12 @@ int main(int argc, char *argv[])
 	keyend = buf + ktlen + 1;
 
 	/* the actual key description follows the last semicolon */
-	keyend = rindex(keyend, ';');
+	keyend = strrchr(keyend, ';');
 	if (!keyend)
 		error("Invalid key description: %s", buf);
 	keyend++;
 
-	name = index(keyend, ':');
+	name = strchr(keyend, ':');
 	if (!name)
 		dns_query_a_or_aaaa(keyend, callout_info);