diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/pc_sample.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kern/pc_sample.c b/kern/pc_sample.c index 81b2056..fcb9d71 100644 --- a/kern/pc_sample.c +++ b/kern/pc_sample.c @@ -189,6 +189,9 @@ get_sampled_pcs( (sampled_pc_array_t)cp->buffer, (seqidx2 + 1) * sizeof(sampled_pc_t)); } + } else if (nsamples < 0) { + /* Bogus SEQNO supplied. */ + nsamples = 0; } else { /* could either be zero because of overflow, or because * we are being lied to. In either case, return nothing. |