summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-27 21:19:37 +0200
committerVolker Lendecke <vl@samba.org>2011-03-27 22:22:12 +0200
commit8d9cbc7c221ae49acef60f82e90f387b05c8e91f (patch)
treee8b9d44eaf99ebb63eaf9c7719c44ae9866f940d /librpc
parent9370c28425500c0ad8cff27886c49ce256a1e59e (diff)
downloadsamba-8d9cbc7c221ae49acef60f82e90f387b05c8e91f.tar.gz
librpc: Add some error checking to dcerpc_floor_pack_rhs_if_version_data
Diffstat (limited to 'librpc')
-rw-r--r--librpc/rpc/binding.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index af47fcea3ca..381e3aedb54 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -443,6 +443,7 @@ static bool dcerpc_floor_pack_rhs_if_version_data(
{
DATA_BLOB blob;
struct ndr_push *ndr = ndr_push_init_ctx(mem_ctx);
+ enum ndr_err_code ndr_err;
if (ndr == NULL) {
return false;
@@ -450,7 +451,10 @@ static bool dcerpc_floor_pack_rhs_if_version_data(
ndr->flags |= LIBNDR_FLAG_NOALIGN;
- ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version >> 16);
+ ndr_err = ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version >> 16);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return false;
+ }
blob = ndr_push_blob(ndr);
talloc_steal(mem_ctx, blob.data);