Skip to content

Commit

Permalink
Tolerate null oid pointer in gss_release_oid()
Browse files Browse the repository at this point in the history
Under some circumstances, gss_inquire_name() can call
gss_release_oid() with a null oid pointer, which currently causes a
null dereference.  The least invasive fix is for gss_release_oid() to
check for the invalid null pointer and return an error, like other
GSS-API functions do.

(cherry picked from commit 4676e82)

ticket: 8201
version_fixed: 1.13.3
status: resolved
  • Loading branch information
greghudson authored and tlyu committed Jun 24, 2015
1 parent 98cf93e commit cda902b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/gssapi/mechglue/g_initialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ gss_OID *oid;
OM_uint32 major;
gss_mech_info aMech;

if (minor_status == NULL)
if (minor_status == NULL || oid == NULL)
return (GSS_S_CALL_INACCESSIBLE_WRITE);

*minor_status = gssint_mechglue_initialize_library();
Expand Down

0 comments on commit cda902b

Please sign in to comment.