From 1e115901180fa5e239f5e911367cc43416030fb1 Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 12 Jul 2005 06:14:49 +0000 Subject: [PATCH] - fixed possible access to of bounds in cmobd --- lustre/cmobd/cm_obd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lustre/cmobd/cm_obd.c b/lustre/cmobd/cm_obd.c index b44903f..a7ed17c 100644 --- a/lustre/cmobd/cm_obd.c +++ b/lustre/cmobd/cm_obd.c @@ -105,9 +105,8 @@ cmobd_find_obd(struct obd_device *obd, struct obd_uuid *uuid) CWARN("%s: looking for client obd %s\n", obd->obd_uuid.uuid, uuid->uuid); - for (i = 0; i < sizeof(types); i++) { - res = class_find_client_obd(NULL, types[i], - uuid); + for (i = 0; i < sizeof(types) / sizeof(char *); i++) { + res = class_find_client_obd(NULL, types[i], uuid); if (res) RETURN(res); } -- 1.8.3.1