diff options
author | Volker Lendecke <vl@samba.org> | 2015-08-16 13:03:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2015-08-20 12:49:21 +0200 |
commit | 2fbce8ad0a90398b3499085f6e3dbf8e9aae24e5 (patch) | |
tree | 6f538f73b46ddabe8142560b1089f88f4cce042f /auth | |
parent | 62d08ea715d1664a7600250abbd1dc83f3a33a4c (diff) | |
download | samba-2fbce8ad0a90398b3499085f6e3dbf8e9aae24e5.tar.gz |
gensec: Fix CID 242642 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/gensec/spnego.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c index 85c70e12f64..c111b85bb01 100644 --- a/auth/gensec/spnego.c +++ b/auth/gensec/spnego.c @@ -1184,6 +1184,7 @@ static NTSTATUS gensec_spnego_update_out(struct gensec_security *gensec_security { struct spnego_state *spnego_state = (struct spnego_state *)gensec_security->private_data; DATA_BLOB out = data_blob_null; + bool ok; *_out = data_blob_null; @@ -1222,7 +1223,11 @@ static NTSTATUS gensec_spnego_update_out(struct gensec_security *gensec_security /* * truncate the buffer */ - data_blob_realloc(spnego_state, &out, spnego_state->out_max_length); + ok = data_blob_realloc(spnego_state, &out, + spnego_state->out_max_length); + if (!ok) { + return NT_STATUS_NO_MEMORY; + } talloc_steal(out_mem_ctx, out.data); *_out = out; |