diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-10 22:36:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:30 -0500 |
commit | d792ee488372c7259567d12b141cf449c0bdb6a8 (patch) | |
tree | 03774ac581374550030b2c9b7075e5fa0e51a7ad /source4/librpc | |
parent | ddcb89ccfc0d01bbd9a2b999833a5b095a13852d (diff) | |
download | samba-d792ee488372c7259567d12b141cf449c0bdb6a8.tar.gz samba-d792ee488372c7259567d12b141cf449c0bdb6a8.tar.bz2 samba-d792ee488372c7259567d12b141cf449c0bdb6a8.zip |
r4139: 2nd attempt at fixing the null ptr in size_is() problem.
(This used to be commit 3040cd65151dbcc54404f9be9d1fbcf539c7b635)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/ndr/ndr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 7b55f4efb7..0543fbf0d3 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -700,12 +700,9 @@ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p) /* check the stored array size field */ -NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, const void **p, uint32_t size) +NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size) { - uint32 stored; - if (*p == NULL) { - return NT_STATUS_OK; - } + uint32_t stored; NDR_CHECK(ndr_token_retrieve(&ndr->array_size_list, p, &stored)); if (stored != size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, @@ -744,9 +741,6 @@ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p) NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length) { uint32_t stored; - if (*(void **)p == NULL) { - return NT_STATUS_OK; - } NDR_CHECK(ndr_token_retrieve(&ndr->array_length_list, p, &stored)); if (stored != length) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, |