]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gensec: Make gensec_security_by_oid_list() callable with skip==NULL
authorVolker Lendecke <vl@samba.org>
Thu, 11 Jun 2026 11:24:17 +0000 (13:24 +0200)
committerAnoop C S <anoopcs@samba.org>
Wed, 17 Jun 2026 08:28:32 +0000 (08:28 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
auth/gensec/gensec_start.c

index 1fab9989089916811f62546e87e6ab7ae904e8e2..1a4b44d423cbd923f05a0b3d13d6cb5657879a7f 100644 (file)
@@ -479,7 +479,9 @@ _PUBLIC_ const struct gensec_security_ops_wrapper *gensec_security_by_oid_list(
                        continue;
                }
                for (oid_idx = 0; oid_strings[oid_idx]; oid_idx++) {
-                       if (strcmp(oid_strings[oid_idx], skip) == 0) {
+                       if ((skip != NULL) &&
+                           (strcmp(oid_strings[oid_idx], skip) == 0))
+                       {
                                continue;
                        }