netsamlogon_cache: Use ndr_pull_struct_blob_all
authorVolker Lendecke <vl@samba.org>
Thu, 3 Aug 2017 15:03:26 +0000 (17:03 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 13 Nov 2017 22:54:46 +0000 (23:54 +0100)
Be a bit more strict for error checking

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/samlogon_cache.c

index 0a2890e4231ab1d359d95dc764e8c1f937644294..70645f2dc402b749ed3edf39f9363e152e9fbbb1 100644 (file)
@@ -253,8 +253,9 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
 
        blob = data_blob_const(data.dptr, data.dsize);
 
-       ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &r,
-                                     (ndr_pull_flags_fn_t)ndr_pull_netsamlogoncache_entry);
+       ndr_err = ndr_pull_struct_blob_all(
+               &blob, mem_ctx, &r,
+               (ndr_pull_flags_fn_t)ndr_pull_netsamlogoncache_entry);
 
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                DEBUG(0,("netsamlogon_cache_get: failed to pull entry from cache\n"));