]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r24069: Fix Coverity ID 368. We would segfault if 0 < data.dsize < 8
authorVolker Lendecke <vlendec@samba.org>
Sun, 29 Jul 2007 09:51:06 +0000 (09:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:29:01 +0000 (12:29 -0500)
(This used to be commit fa536325681971307661b5d4efde3e8e54f3eca5)

source3/printing/notify.c

index d96e9ae056c357ce0d57e5870ff33a35e6e29405..0b51475391c27a2d6956074e9f71f2affe247e2b 100644 (file)
@@ -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;