summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-08-16 13:03:13 +0200
committerVolker Lendecke <vl@samba.org>2015-08-20 12:49:21 +0200
commit2fbce8ad0a90398b3499085f6e3dbf8e9aae24e5 (patch)
tree6f538f73b46ddabe8142560b1089f88f4cce042f /auth
parent62d08ea715d1664a7600250abbd1dc83f3a33a4c (diff)
downloadsamba-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.c7
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;