diff options
author | John-Mark Gurney <jmg@FreeBSD.org> | 2003-06-23 03:17:03 +0000 |
---|---|---|
committer | John-Mark Gurney <jmg@FreeBSD.org> | 2003-06-23 03:17:03 +0000 |
commit | e3f932de5a35dc53acb0be154494b53cf78fcd17 (patch) | |
tree | 2340d477e292834b57fc82d59de4c01bcf8195a7 /sys/dev/pci/pci_user.c | |
parent | 07e3ed79cdbb89b4352208c3563a54dcaa48c09e (diff) | |
download | src-e3f932de5a35dc53acb0be154494b53cf78fcd17.tar.gz src-e3f932de5a35dc53acb0be154494b53cf78fcd17.zip |
prevent the number of patterns from exceeding the number of pci devices.
Submitted by: rwatson
Notes
Notes:
svn path=/head/; revision=116704
Diffstat (limited to 'sys/dev/pci/pci_user.c')
-rw-r--r-- | sys/dev/pci/pci_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c index 252422f26d4e..a295af77daf7 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: |