summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-03-16 16:46:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:33 -0500
commitf4a5c016e31f8254800b6aec971f9397f0ee8ed1 (patch)
tree8641d80f5859888fe141267f0d033cecd02fd224 /source3/rpc_server
parent2b1641c9947e8845e52218d8f112a5bace5e37a0 (diff)
downloadsamba-f4a5c016e31f8254800b6aec971f9397f0ee8ed1.tar.gz
samba-f4a5c016e31f8254800b6aec971f9397f0ee8ed1.tar.bz2
samba-f4a5c016e31f8254800b6aec971f9397f0ee8ed1.zip
r14482: Fixes for spoolss code (after coverity fixes) when the
client sends a NULL RPC_BUFFER* (This used to be commit 69f816e9f885bdeb6e8c67222b6fdca76d9d1025)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 38d2827956..350e9d3562 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4621,7 +4621,7 @@ WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -4936,7 +4936,7 @@ WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GET
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -5535,7 +5535,7 @@ WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -6374,7 +6374,7 @@ WERROR _spoolss_addjob(pipes_struct *p, SPOOL_Q_ADDJOB *q_u, SPOOL_R_ADDJOB *r_u
{
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (q_u->offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -6589,7 +6589,7 @@ WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJO
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -6966,7 +6966,7 @@ WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -7031,7 +7031,7 @@ WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMF
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0) ) {
return WERR_INVALID_PARAM;
}
@@ -7144,7 +7144,7 @@ WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -7430,7 +7430,7 @@ WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUM
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -7840,7 +7840,7 @@ WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRI
/* that's an [in out] buffer */
- if (!q_u->buffer ) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -8452,7 +8452,7 @@ WERROR _spoolss_enumprintprocessors(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCESSORS
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -8531,7 +8531,7 @@ WERROR _spoolss_enumprintprocdatatypes(pipes_struct *p, SPOOL_Q_ENUMPRINTPROCDAT
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -8659,7 +8659,7 @@ WERROR _spoolss_enumprintmonitors(pipes_struct *p, SPOOL_Q_ENUMPRINTMONITORS *q_
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -8835,7 +8835,7 @@ WERROR _spoolss_getjob( pipes_struct *p, SPOOL_Q_GETJOB *q_u, SPOOL_R_GETJOB *r_
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}
@@ -9457,7 +9457,7 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC
/* that's an [in out] buffer */
- if (!q_u->buffer) {
+ if (!q_u->buffer && (offered!=0)) {
return WERR_INVALID_PARAM;
}