git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f64342
)
make sure we have a devmode before copying a string to the devicename; patch from...
author
Gerald Carter
<jerry@samba.org>
Mon, 20 Oct 2003 14:02:58 +0000
(14:02 +0000)
committer
Gerald Carter
<jerry@samba.org>
Mon, 20 Oct 2003 14:02:58 +0000
(14:02 +0000)
(This used to be commit
5479cb60c038969270353b9ff7a8e9967e066dfd
)
source3/printing/nt_printing.c
patch
|
blob
|
history
diff --git
a/source3/printing/nt_printing.c
b/source3/printing/nt_printing.c
index 9c95cf90856504b6a5a98b2c258e51d23acc0b6e..5b5b5885ab0bd9afac020cb3eab84767efcea560 100644
(file)
--- a/
source3/printing/nt_printing.c
+++ b/
source3/printing/nt_printing.c
@@
-3306,10
+3306,11
@@
static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, const char *sh
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 );