summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-06-12 12:22:25 +1000
committerAndrew Tridgell <tridge@samba.org>2009-06-12 12:23:46 +1000
commitf5a47dc4bf2793ab328c8b0e35adace497819e7d (patch)
tree636b9a3628d707695dae6d72eaecc00188ed676b
parentbbe758d55b58a28ae2585de07fde835b14445843 (diff)
downloadsamba-f5a47dc4bf2793ab328c8b0e35adace497819e7d.tar.gz
samba-f5a47dc4bf2793ab328c8b0e35adace497819e7d.tar.bz2
samba-f5a47dc4bf2793ab328c8b0e35adace497819e7d.zip
avoid crashes in ndr_print_*() calls
This is a hackish fix, but it will do for now
-rw-r--r--librpc/ndr/ndr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 8188ec998f..f253bcb7aa 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -218,6 +218,7 @@ _PUBLIC_ void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr)
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
ndr->flags = 0;
+ ndr->iconv_convenience = global_iconv_convenience;
fn(ndr, name, ptr);
talloc_free(ndr);
}
@@ -236,6 +237,7 @@ _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
ndr->flags = 0;
+ ndr->iconv_convenience = global_iconv_convenience;
ndr_print_set_switch_value(ndr, ptr, level);
fn(ndr, name, ptr);
talloc_free(ndr);
@@ -255,6 +257,7 @@ _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
ndr->flags = 0;
+ ndr->iconv_convenience = global_iconv_convenience;
fn(ndr, name, flags, ptr);
talloc_free(ndr);
}
@@ -276,6 +279,7 @@ _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, c
ndr->print = ndr_print_string_helper;
ndr->depth = 1;
ndr->flags = 0;
+ ndr->iconv_convenience = global_iconv_convenience;
fn(ndr, name, ptr);
ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
failed:
@@ -300,6 +304,7 @@ _PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, co
ndr->print = ndr_print_string_helper;
ndr->depth = 1;
ndr->flags = 0;
+ ndr->iconv_convenience = global_iconv_convenience;
ndr_print_set_switch_value(ndr, ptr, level);
fn(ndr, name, ptr);
ret = talloc_steal(mem_ctx, (char *)ndr->private_data);