From 6235c1f6ae1561e00a9bdf707d4e4427dfaded0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Fri, 10 Oct 2003 11:00:06 +0000 Subject: [PATCH] Dont store ata_params for devices that return a bogus ident string. --- sys/dev/ata/ata-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 825027eac23..f58e49e3515 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -555,6 +556,8 @@ ata_getparam(struct ata_device *atadev, u_int8_t command) } ata_free_request(request); } + if (!isalpha(atacap->model[0]) || !isalpha(atacap->model[1])) + error = ENXIO; if (error) { atadev->param = NULL; free(atacap, M_ATA);