diff options
author | Gerald Carter <jerry@samba.org> | 2003-03-06 16:09:11 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-03-06 16:09:11 +0000 |
commit | ccb58b303a5f9b37922450fa535c019511895a8a (patch) | |
tree | 7c32959576998230990ea1ac07749cd69dd7d327 | |
parent | fb9e22d6c8044f72867695591df9792367d765c0 (diff) | |
download | samba-ccb58b303a5f9b37922450fa535c019511895a8a.tar.gz samba-ccb58b303a5f9b37922450fa535c019511895a8a.tar.bz2 samba-ccb58b303a5f9b37922450fa535c019511895a8a.zip |
add #define for the max device name length in a DEVICEMODE
(This used to be commit 52ef84b53495db1eac6ecfb0b926ef8df7ea5cc5)
-rw-r--r-- | source3/include/nt_printing.h | 2 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 2 | ||||
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index ca65a40d48..762b1c6917 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -255,6 +255,8 @@ typedef struct { NT_PRINTER_KEY *keys; } NT_PRINTER_DATA; +#define MAXDEVICENAME 32 + typedef struct ntdevicemode { fstring devicename; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index fd1f847a21..74a9ac8174 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2110,7 +2110,7 @@ done: NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename) { - char adevice[32]; + char adevice[MAXDEVICENAME]; NT_DEVICEMODE *nt_devmode = (NT_DEVICEMODE *)malloc(sizeof(NT_DEVICEMODE)); if (nt_devmode == NULL) { diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 0545f89ff7..a5d2087a3a 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -684,7 +684,7 @@ BOOL spoolss_io_devmode(const char *desc, prs_struct *ps, int depth, DEVICEMODE return False; } - if (!prs_uint16uni(True,"devicename", ps, depth, devmode->devicename.buffer, 32)) + if (!prs_uint16uni(True,"devicename", ps, depth, devmode->devicename.buffer, MAXDEVICENAME)) return False; if (!prs_uint16("specversion", ps, depth, &devmode->specversion)) |