diff options
author | Günther Deschner <gd@samba.org> | 2009-12-12 02:52:41 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-12-14 10:39:34 +0100 |
commit | e316624ddb8d4e178b03b315bfafd793e6c297c8 (patch) | |
tree | 9ca063db63742640ae309741494df3f1c616b9d8 /librpc/gen_ndr | |
parent | 5ae61cfbc281f346fd3712a975c5796f9cfbc6c2 (diff) | |
download | samba-e316624ddb8d4e178b03b315bfafd793e6c297c8.tar.gz samba-e316624ddb8d4e178b03b315bfafd793e6c297c8.tar.bz2 samba-e316624ddb8d4e178b03b315bfafd793e6c297c8.zip |
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
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.c | 5 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_spoolss.h | 1 | ||||
-rw-r--r-- | librpc/gen_ndr/spoolss.h | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index 388d707d3b..f4cf9687bd 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -15724,11 +15724,6 @@ _PUBLIC_ void ndr_print_spoolss_PrinterData(struct ndr_print *ndr, const char *n } } -_PUBLIC_ size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags) -{ - return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData, ic); -} - static enum ndr_err_code ndr_push_spoolss_FormFlags(struct ndr_push *ndr, int ndr_flags, enum spoolss_FormFlags r) { NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r)); diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h index 2fb6e9ffea..b368006572 100644 --- a/librpc/gen_ndr/ndr_spoolss.h +++ b/librpc/gen_ndr/ndr_spoolss.h @@ -433,7 +433,6 @@ size_t ndr_size_spoolss_OSVersionEx(const struct spoolss_OSVersionEx *r, struct enum ndr_err_code ndr_push_spoolss_PrinterData(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrinterData *r); enum ndr_err_code ndr_pull_spoolss_PrinterData(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrinterData *r); void ndr_print_spoolss_PrinterData(struct ndr_print *ndr, const char *name, const union spoolss_PrinterData *r); -size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags); void ndr_print_spoolss_FormFlags(struct ndr_print *ndr, const char *name, enum spoolss_FormFlags r); void ndr_print_spoolss_FormSize(struct ndr_print *ndr, const char *name, const struct spoolss_FormSize *r); void ndr_print_spoolss_FormArea(struct ndr_print *ndr, const char *name, const struct spoolss_FormArea *r); diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 146dde5e2d..5b88e08ac3 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -1569,7 +1569,7 @@ union spoolss_PrinterData { uint32_t value;/* [case(REG_DWORD)] */ const char ** string_array;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(REG_MULTI_SZ)] */ DATA_BLOB data;/* [flag(LIBNDR_FLAG_REMAINING),default] */ -}/* [gensize,public,nodiscriminant] */; +}/* [nodiscriminant,public] */; enum spoolss_FormFlags #ifndef USE_UINT_ENUMS |