From: Aki Tuomi Date: Tue, 1 Mar 2022 08:01:06 +0000 (+0200) Subject: auth: db-oauth2 - Fix off by one in oauth2 variable handling X-Git-Tag: 2.3.19~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c2f3d0b85830d18dbb8b45b348da091e24d1b3b;p=thirdparty%2Fdovecot%2Fcore.git auth: db-oauth2 - Fix off by one in oauth2 variable handling Broken in 9b670175445a75987a713ff899d1a945255b0b5b --- diff --git a/src/auth/db-oauth2.c b/src/auth/db-oauth2.c index a7eaee40e6..3c6ef3acb9 100644 --- a/src/auth/db-oauth2.c +++ b/src/auth/db-oauth2.c @@ -395,7 +395,7 @@ db_oauth2_have_all_fields(struct db_oauth2_request *req) ptr = ptr+idx; field = t_strndup(ptr,size); if (str_begins(field, "oauth2:") && - !auth_fields_exists(req->fields, ptr+8)) + !auth_fields_exists(req->fields, ptr+7)) return FALSE; ptr = ptr+size; }