diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-20 11:08:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:45:48 +0100 |
commit | 7dcaee5503d0b2d6f074ceb9f26b95548ea3aeef (patch) | |
tree | dd0e2cbe4c12bf897b034cc476055708a8dce9e4 | |
parent | cc9c53320dd68a5603e3dbccce2b49268f1a9f30 (diff) | |
download | samba-7dcaee5503d0b2d6f074ceb9f26b95548ea3aeef.tar.gz samba-7dcaee5503d0b2d6f074ceb9f26b95548ea3aeef.tar.bz2 samba-7dcaee5503d0b2d6f074ceb9f26b95548ea3aeef.zip |
r26051: ndr_string: don't use ndr_pull_save anymore
metze
(This used to be commit adda63122e0afd5e10c834cbab8baee1ef1a3a24)
-rw-r--r-- | source4/librpc/ndr/ndr_string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index ffd73c748e..ed007b4d3b 100644 --- a/source4/librpc/ndr/ndr_string.c +++ b/source4/librpc/ndr/ndr_string.c @@ -650,21 +650,21 @@ _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size) _PUBLIC_ enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size) { uint32_t i; - struct ndr_pull_save save_offset; + uint32_t save_offset; - ndr_pull_save(ndr, &save_offset); + save_offset = ndr->offset; ndr_pull_advance(ndr, (count - 1) * element_size); NDR_PULL_NEED_BYTES(ndr, element_size); for (i = 0; i < element_size; i++) { if (ndr->data[ndr->offset+i] != 0) { - ndr_pull_restore(ndr, &save_offset); + ndr->offset = save_offset; return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "String terminator not present or outside string boundaries"); } } - ndr_pull_restore(ndr, &save_offset); + ndr->offset = save_offset; return NDR_ERR_SUCCESS; } |