diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-02-17 20:27:08 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-18 13:44:03 +0100 |
commit | b5f9c44da55abb28222441a7e064a2a25891981f (patch) | |
tree | d18ecfe94d774a0e8586c556ae1204f3e0539613 /librpc/ndr | |
parent | a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8 (diff) | |
download | samba-b5f9c44da55abb28222441a7e064a2a25891981f.tar.gz samba-b5f9c44da55abb28222441a7e064a2a25891981f.tar.bz2 samba-b5f9c44da55abb28222441a7e064a2a25891981f.zip |
libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag
metze
Diffstat (limited to 'librpc/ndr')
-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 4e584e102b..0ff43c3eb4 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1160,7 +1160,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"); } /* |