diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-20 00:49:37 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-20 00:49:37 +0000 |
commit | d17a279cbdc8f21d9229f8e80ccefab5e925143d (patch) | |
tree | 0b21dc0d06a73941b4c0772f4610bae9526e42d2 /lib/libgssapi/gss_wrap_size_limit.c | |
parent | 89c6fc4bee45c341529e586ec35efae29be510a8 (diff) | |
download | FreeBSD-src-d17a279cbdc8f21d9229f8e80ccefab5e925143d.zip FreeBSD-src-d17a279cbdc8f21d9229f8e80ccefab5e925143d.tar.gz |
MFC 297942:
libgssapi: avoid NULL pointer dereferences.
While here also use NULL instead of zero for pointers.
Diffstat (limited to 'lib/libgssapi/gss_wrap_size_limit.c')
-rw-r--r-- | lib/libgssapi/gss_wrap_size_limit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libgssapi/gss_wrap_size_limit.c b/lib/libgssapi/gss_wrap_size_limit.c index 15a8706..7038a57 100644 --- a/lib/libgssapi/gss_wrap_size_limit.c +++ b/lib/libgssapi/gss_wrap_size_limit.c @@ -40,13 +40,14 @@ gss_wrap_size_limit(OM_uint32 *minor_status, OM_uint32 *max_input_size) { struct _gss_context *ctx = (struct _gss_context *) context_handle; - struct _gss_mech_switch *m = ctx->gc_mech; + struct _gss_mech_switch *m; *max_input_size = 0; if (ctx == NULL) { *minor_status = 0; return (GSS_S_NO_CONTEXT); } + m = ctx->gc_mech; return (m->gm_wrap_size_limit(minor_status, ctx->gc_ctx, conf_req_flag, qop_req, req_output_size, max_input_size)); |