From: bobijam Date: Mon, 4 Aug 2008 02:03:16 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_50~83 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6acca1e170b4f0bbba63286d8ec64c729008ddbb;ds=sidebyside Branch HEAD b=15576 i=adilger, johann minor fix to make the code safer. --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index d015eff..98c15fe 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; } }