summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrilysh <nightquick@proton.me>2024-01-21 12:18:09 +0530
committerTomas Mraz <tomas@openssl.org>2024-01-25 16:39:09 +0100
commit0f644b96d209443b4566f7e86e3be2568292e75b (patch)
tree6f09a8f3a719e42ae35af6abe3092e18f3aca591 /apps
parentea6268cfceaba24328d66bd14bfc97c4fac14a58 (diff)
replace strstr() with strchr() for single characters
strstr() is used to match multiple characters in the haystack, whereas strchr() is used to matched only single character. CLA: trivial Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23347)
Diffstat (limited to 'apps')
-rw-r--r--apps/engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/engine.c b/apps/engine.c
index dc57dc7465..35d0368b3a 100644
--- a/apps/engine.c
+++ b/apps/engine.c
@@ -251,7 +251,7 @@ static void util_do_cmds(ENGINE *e, STACK_OF(OPENSSL_STRING) *cmds,
cmd = sk_OPENSSL_STRING_value(cmds, loop);
res = 1; /* assume success */
/* Check if this command has no ":arg" */
- if ((arg = strstr(cmd, ":")) == NULL) {
+ if ((arg = strchr(cmd, ':')) == NULL) {
if (!ENGINE_ctrl_cmd_string(e, cmd, NULL, 0))
res = 0;
} else {