mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
add #define for the max device name length in a DEVICEMODE
This commit is contained in:
parent
214decbda6
commit
52ef84b534
@ -255,6 +255,8 @@ typedef struct {
|
||||
NT_PRINTER_KEY *keys;
|
||||
} NT_PRINTER_DATA;
|
||||
|
||||
#define MAXDEVICENAME 32
|
||||
|
||||
typedef struct ntdevicemode
|
||||
{
|
||||
fstring devicename;
|
||||
|
@ -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) {
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user