diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 8d7973d13e..d74204800a 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1484,8 +1484,11 @@ bool convert_devicemode(const char *printername, return false; } - rpcstr_push(nt_devmode->devicename, devmode->devicename, 31, 0); - rpcstr_push(nt_devmode->formname, devmode->formname, 31, 0); + fstrcpy(nt_devmode->devicename, devmode->devicename); + fstrcpy(nt_devmode->formname, devmode->formname); + + nt_devmode->devicename[31] = '\0'; + nt_devmode->formname[31] = '\0'; nt_devmode->specversion = devmode->specversion; nt_devmode->driverversion = devmode->driverversion; |