git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66565a3
)
Fix bug 7297 - smbd crashes with CUPS printers and no [printers] share defined.
author
Jeremy Allison
<jra@samba.org>
Fri, 26 Mar 2010 00:09:23 +0000
(17:09 -0700)
committer
Karolin Seeger
<kseeger@samba.org>
Mon, 29 Mar 2010 06:57:26 +0000
(08:57 +0200)
Ensure we don't dereference an array with an index of -1.
Jeremy.
source3/smbd/service.c
patch
|
blob
|
history
diff --git
a/source3/smbd/service.c
b/source3/smbd/service.c
index 572861a08467b88b1f950c321d94238dfb3a38e3..25e0eb10f8e6dd77bc925e5643167f53f853db72 100644
(file)
--- a/
source3/smbd/service.c
+++ b/
source3/smbd/service.c
@@
-339,7
+339,7
@@
int find_service(fstring service)
if ((iPrinterService = lp_servicenumber(PRINTERS_NAME)) < 0) {
iPrinterService = load_registry_service(PRINTERS_NAME);
}
- if (iPrinterService) {
+ if (iPrinterService
>= 0
) {
DEBUG(3,("checking whether %s is a valid printer name...\n", service));
if (pcap_printername_ok(service)) {
DEBUG(3,("%s is a valid printer name\n", service));