git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0454ff
)
s3-rpc_server: Fix a possible null pointer dereference.
author
Andreas Schneider
<asn@samba.org>
Mon, 17 Dec 2012 14:31:21 +0000
(15:31 +0100)
committer
Günther Deschner
<gd@samba.org>
Fri, 21 Dec 2012 12:56:01 +0000
(13:56 +0100)
This variable can be set to NULL in an earlier function call.
Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/rpc_server/spoolss/srv_spoolss_nt.c
patch
|
blob
|
history
diff --git
a/source3/rpc_server/spoolss/srv_spoolss_nt.c
b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index b8ee9f407249c9ced17051d4c3283b6d298d015d..531b2898ab0d2093decf3f915746061693666b03 100644
(file)
--- a/
source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/
source3/rpc_server/spoolss/srv_spoolss_nt.c
@@
-4428,7
+4428,8
@@
static WERROR enum_all_printers_info_1_name(TALLOC_CTX *mem_ctx,
DEBUG(4,("enum_all_printers_info_1_name\n"));
- if ((servername[0] == '\\') && (servername[1] == '\\')) {
+ if (servername != NULL &&
+ (servername[0] == '\\') && (servername[1] == '\\')) {
s = servername + 2;
}