From 5dfca41422e0b4149ad7f5b59c00c6fe1c2760ca Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 29 Dec 2014 02:16:28 +0100 Subject: [PATCH] fix more memcmp() abuse amends 1217193fb and 4f383a807. --- src/drv_imap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index 292c662..0cbe81c 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -1001,7 +1001,7 @@ parse_capability( imap_store_t *ctx, char *cmd ) ctx->auth_mechs = 0; ctx->caps = 0x80000000; while ((arg = next_arg( &cmd ))) { - if (!memcmp( "AUTH=", arg, 5 )) { + if (starts_with( arg, -1, "AUTH=", 5 )) { add_string_list( &ctx->auth_mechs, arg + 5 ); } else { for (i = 0; i < as(cap_list); i++) @@ -2519,7 +2519,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) #endif if (starts_with( arg, -1, "imap:", 5 )) arg += 5; - if (!memcmp( "//", arg, 2 )) + if (starts_with( arg, -1, "//", 2 )) arg += 2; if (arg != cfg->val) warn( "%s:%d: Notice: URL notation is deprecated; use a plain host name and possibly 'SSLType IMAPS' instead\n", cfg->file, cfg->line );