summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-29 09:51:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:01 -0500
commited74f288f11bf4622bda75fe9ba8e97be71949fd (patch)
treed15c05a979c2f8bb5fffb894054837a8a13653fe
parentd5ca533043cbcd69b08fd7b950891f4ea67cb9a6 (diff)
downloadsamba-ed74f288f11bf4622bda75fe9ba8e97be71949fd.tar.gz
samba-ed74f288f11bf4622bda75fe9ba8e97be71949fd.tar.bz2
samba-ed74f288f11bf4622bda75fe9ba8e97be71949fd.zip
r24069: Fix Coverity ID 368. We would segfault if 0 < data.dsize < 8
(This used to be commit fa536325681971307661b5d4efde3e8e54f3eca5)
-rw-r--r--source3/printing/notify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index d96e9ae056..0b51475391 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -553,7 +553,7 @@ BOOL print_notify_pid_list(const char *printername, TALLOC_CTX *mem_ctx, size_t
pid_list = NULL;
}
- for( i = 0, offset = 0; offset < data.dsize; offset += 8, i++)
+ for( i = 0, offset = 0; i < num_pids; offset += 8, i++)
pid_list[i] = (pid_t)IVAL(data.dptr, offset);
*pp_pid_list = pid_list;