mirror of
https://github.com/samba-team/samba.git
synced 2025-02-01 05:47:28 +03:00
make sure we have a devmode before copying a string to the devicename; patch from metze
This commit is contained in:
parent
169f4dfee0
commit
1700e83ac8
@ -3306,10 +3306,11 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, const char *sh
|
|||||||
printername));
|
printername));
|
||||||
info.devmode = construct_nt_devicemode(printername);
|
info.devmode = construct_nt_devicemode(printername);
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_strcpy(adevice, info.printername, sizeof(adevice)-1);
|
|
||||||
fstrcpy(info.devmode->devicename, adevice);
|
|
||||||
|
|
||||||
|
safe_strcpy(adevice, info.printername, sizeof(adevice)-1);
|
||||||
|
if (info.devmode) {
|
||||||
|
fstrcpy(info.devmode->devicename, adevice);
|
||||||
|
}
|
||||||
|
|
||||||
len += unpack_values( &info.data, dbuf.dptr+len, dbuf.dsize-len );
|
len += unpack_values( &info.data, dbuf.dptr+len, dbuf.dsize-len );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user