From f749ae2faa23bd75c9842fe76ab3c84f83dd23a7 Mon Sep 17 00:00:00 2001 From: jmg Date: Mon, 23 Jun 2003 03:17:03 +0000 Subject: prevent the number of patterns from exceeding the number of pci devices. Submitted by: rwatson --- sys/dev/pci/pci_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 252422f..a295af7 100644 --- a/sys/dev/pci/pci_user.c +++ b/sys/dev/pci/pci_user.c @@ -249,7 +249,7 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) * If this test is true, the user wants the pci_conf * structures returned to match the supplied entries. */ - if ((cio->num_patterns > 0) + if ((cio->num_patterns > 0) && (cio->num_patterns < pci_numdevs) && (cio->pat_buf_len > 0)) { /* * pat_buf_len needs to be: -- cgit v1.1