From e316624ddb8d4e178b03b315bfafd793e6c297c8 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 12 Dec 2009 02:52:41 +0100 Subject: spoolss: fix spoolss_PrinterData size calculation. Currently we were crashing in EnumPrinterDataEx when an e.g. an empty (NULL) string for a separator file was returned. Guenther --- librpc/ndr/ndr_spoolss_buf.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'librpc/ndr/ndr_spoolss_buf.c') diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c index 853d9aaac6..b8d6f83ab6 100644 --- a/librpc/ndr/ndr_spoolss_buf.c +++ b/librpc/ndr/ndr_spoolss_buf.c @@ -1355,3 +1355,11 @@ void ndr_print_spoolss_Field(struct ndr_print *ndr, const char *name, const unio } } +_PUBLIC_ size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags) +{ + if (!r) { + return 0; + } + return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData, ic); +} + -- cgit