From 6acca1e170b4f0bbba63286d8ec64c729008ddbb Mon Sep 17 00:00:00 2001 From: bobijam <bobijam> Date: Mon, 4 Aug 2008 02:03:16 +0000 Subject: [PATCH] Branch HEAD b=15576 i=adilger, johann minor fix to make the code safer. --- lustre/obdclass/genops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index d015eff0c8..98c15fe8bf 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -317,7 +317,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name) new_obd_minor = i; result->obd_type = type; strncpy(result->obd_name, name, - sizeof(result->obd_name)); + sizeof(result->obd_name) - 1); obd_devs[i] = result; } } -- GitLab