Skip to content
Snippets Groups Projects
Commit 6acca1e1 authored by Bobi Jam's avatar Bobi Jam
Browse files

Branch HEAD

b=15576
i=adilger, johann

minor fix to make the code safer.
parent 18bbd32d
No related branches found
No related tags found
No related merge requests found
...@@ -317,7 +317,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name) ...@@ -317,7 +317,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name)
new_obd_minor = i; new_obd_minor = i;
result->obd_type = type; result->obd_type = type;
strncpy(result->obd_name, name, strncpy(result->obd_name, name,
sizeof(result->obd_name)); sizeof(result->obd_name) - 1);
obd_devs[i] = result; obd_devs[i] = result;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment