From ca2ae87e65c4169d43ae13718f8afe93d4f3789f Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Mon, 30 Nov 2009 18:10:59 +0100 Subject: [PATCH] s3-spoolss: fix fstrings in convert_devicemode() function. Guenther (cherry picked from commit 753b9c6d566fafee9724a84fbd91316767c1c7a2) (cherry picked from commit f5b13667385bbdaa0f75dd46864ad952f7a9bbfe) --- source3/rpc_server/srv_spoolss_nt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 8d7973d13e5..d74204800af 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; -- 2.11.4.GIT