git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a76d29
)
libndr: fix ndr_size_* calculation with relative reverse buffers
author
Stefan Metzmacher
<metze@samba.org>
Thu, 18 Feb 2010 14:13:20 +0000
(15:13 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 18 Feb 2010 14:47:52 +0000
(15:47 +0100)
metze
librpc/ndr/ndr.c
patch
|
blob
|
history
diff --git
a/librpc/ndr/ndr.c
b/librpc/ndr/ndr.c
index 61745aa55acabcb83f637efba36f95e3d0f91634..b6110d52b4b9d86b21dfb1216291fed0b9091573 100644
(file)
--- a/
librpc/ndr/ndr.c
+++ b/
librpc/ndr/ndr.c
@@
-1193,6
+1193,12
@@
_PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons
return NDR_ERR_SUCCESS;
}
+ if (ndr->flags & LIBNDR_FLAG_NO_NDR_SIZE) {
+ /* better say more than calculation a too small buffer */
+ NDR_PUSH_ALIGN(ndr, 8);
+ return NDR_ERR_SUCCESS;
+ }
+
if (ndr->relative_end_offset < ndr->offset) {
return ndr_push_error(ndr, NDR_ERR_RELATIVE,
"ndr_push_relative_ptr2_end:"