diff options
| author | Volker Lendecke <vl@samba.org> | 2015-03-05 11:07:56 +0100 |
|---|---|---|
| committer | Ira Cooper <ira@samba.org> | 2015-03-05 15:59:11 +0100 |
| commit | 5968310060ddc298835a8ee720ae7fe68aece1b9 (patch) | |
| tree | e26c209d398004b757465810017ec3af4bac8451 /source3 | |
| parent | fb86aa86ae040dfa8009d4c13f7712fede8bd063 (diff) | |
| download | samba-5968310060ddc298835a8ee720ae7fe68aece1b9.tar.gz samba-5968310060ddc298835a8ee720ae7fe68aece1b9.tar.xz samba-5968310060ddc298835a8ee720ae7fe68aece1b9.zip | |
perfcount: Fix CID 1274043 Division or modulo by zero
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/modules/perfcount_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c index c0b53360c7..9ff2d36adc 100644 --- a/source3/modules/perfcount_test.c +++ b/source3/modules/perfcount_test.c @@ -172,6 +172,10 @@ static void perfcount_test_dump_counters(void) count_mod = lp_parm_int(0, PARM_PC_TEST_TYPE, PARM_DUMPON_COUNT, PARM_DUMPON_COUNT_DEFAULT); + if (count_mod == 0) { + return; + } + if ((count++ % count_mod) != 0) return; |
