diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-17 20:27:08 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-19 14:32:31 +0100 |
commit | 82dbb0666c0361f2350eadac09886b15c904a36c (patch) | |
tree | 3a2e1bdf15956e8d874233acf0bc44345f71ad82 | |
parent | 365c2f8531ce0bca8b20195be9fff0332d4f5434 (diff) | |
download | samba-82dbb0666c0361f2350eadac09886b15c904a36c.tar.gz |
libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag
metze
(cherry picked from commit b5f9c44da55abb28222441a7e064a2a25891981f)
(cherry picked from commit 983ac75b5b1f6bb79df15340c9ea73ed9c69aee2)
-rw-r--r-- | librpc/ndr/ndr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index 523d7e8c984..5f4ce594154 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1103,7 +1103,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, co if (p == NULL) { return NDR_ERR_SUCCESS; } - return ndr_push_relative_ptr2(ndr, p); + if (!(ndr->flags & LIBNDR_FLAG_RELATIVE_REVERSE)) { + return ndr_push_relative_ptr2(ndr, p); + } + + return ndr_push_error(ndr, NDR_ERR_RELATIVE, + "ndr_push_relative_ptr2_start RELATIVE_REVERSE flag set, but not supported"); } /* |