Changeset 988 for vendor/current/librpc/ndr/ndr.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/librpc/ndr/ndr.c
r919 r988 1 /* 1 /* 2 2 Unix SMB/CIFS implementation. 3 3 … … 5 5 6 6 Copyright (C) Andrew Tridgell 2003 7 7 Copyright (C) Jelmer Vernooij 2005-2008 8 8 9 This program is free software; you can redistribute it and/or modify 9 10 it under the terms of the GNU General Public License as published by 10 11 the Free Software Foundation; either version 3 of the License, or 11 12 (at your option) any later version. 12 13 13 14 This program is distributed in the hope that it will be useful, 14 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 17 GNU General Public License for more details. 17 18 18 19 You should have received a copy of the GNU General Public License 19 20 along with this program. If not, see <http://www.gnu.org/licenses/>. … … 30 31 #include "librpc/ndr/libndr.h" 31 32 #include "../lib/util/dlinklist.h" 32 #if _SAMBA_BUILD_ == 433 #include "param/param.h"34 #endif35 33 36 34 #define NDR_BASE_MARSHALL_SIZE 1024 37 35 38 36 /* this guid indicates NDR encoding in a protocol tower */ 39 const struct ndr_syntax_id ndr_transfer_syntax = {37 const struct ndr_syntax_id ndr_transfer_syntax_ndr = { 40 38 { 0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8}, {0x08,0x00,0x2b,0x10,0x48,0x60} }, 41 39 2 42 40 }; 43 41 44 const struct ndr_syntax_id ndr 64_transfer_syntax= {42 const struct ndr_syntax_id ndr_transfer_syntax_ndr64 = { 45 43 { 0x71710533, 0xbeba, 0x4937, {0x83, 0x19}, {0xb5,0xdb,0xef,0x9c,0xcc,0x36} }, 46 44 1 47 45 }; 48 46 49 const struct ndr_syntax_id n ull_ndr_syntax_id= {47 const struct ndr_syntax_id ndr_syntax_id_null = { 50 48 { 0, 0, 0, { 0, 0 }, { 0, 0, 0, 0, 0, 0 } }, 51 49 0 … … 225 223 ndr->data = talloc_array(ndr, uint8_t, ndr->alloc_size); 226 224 if (!ndr->data) { 225 talloc_free(ndr); 227 226 return NULL; 228 227 } … … 638 637 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &content_size)); 639 638 if (size_is >= 0 && size_is != content_size) { 640 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 641 (int)size_is, (int)content_size); 639 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%04x) mismatch content_size %d (0x%04x)", 640 (int)size_is, (int)size_is, 641 (int)content_size, 642 (int)content_size); 642 643 } 643 644 r_content_size = content_size; … … 649 650 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &content_size)); 650 651 if (size_is >= 0 && size_is != content_size) { 651 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) mismatch content_size %d", 652 (int)size_is, (int)content_size); 652 return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "Bad subcontext (PULL) size_is(%d) (0x%08x) mismatch content_size %d (0x%08x)", 653 (int)size_is, (int)size_is, 654 (int)content_size, 655 (int)content_size); 653 656 } 654 657 r_content_size = content_size;
Note:
See TracChangeset
for help on using the changeset viewer.