From e5f8aed52093ebf55ba950d95d4c6e8e66921bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Mon, 5 May 2003 10:28:37 +0000 Subject: [PATCH] DOnt allow getting caps from other than master and slave device :) --- sbin/atacontrol/atacontrol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sbin/atacontrol/atacontrol.c b/sbin/atacontrol/atacontrol.c index 4161af8475d..dbcb81f5edc 100644 --- a/sbin/atacontrol/atacontrol.c +++ b/sbin/atacontrol/atacontrol.c @@ -197,6 +197,9 @@ ata_cap_print(int fd, int channel, int device) { struct ata_cmd iocmd; + if (device < 0 || device > 1) + return ENXIO; + bzero(&iocmd, sizeof(struct ata_cmd)); iocmd.channel = channel;