af-alg: Fix "'strncpy' specified bound equals destination size" warnings
This commit is contained in:
1 parent
112bb465fb
commit
42ed6b44b2
1 file changed
+2
-2
@@ -218,8 +218,8 @@ af_alg_ops_t *af_alg_ops_create(char *type, char *alg)
|
|||||||
.salg_family = AF_ALG,
|
.salg_family = AF_ALG,
|
||||||
};
|
};
|
||||||
|
|
||||||
strncpy(sa.salg_type, type, sizeof(sa.salg_type));
|
strncpy(sa.salg_type, type, sizeof(sa.salg_type) - 1);
|
||||||
strncpy(sa.salg_name, alg, sizeof(sa.salg_name));
|
strncpy(sa.salg_name, alg, sizeof(sa.salg_name) - 1);
|
||||||
|
|
||||||
INIT(this,
|
INIT(this,
|
||||||
.public = {
|
.public = {
|
||||||
|
|||||||
Reference in new issue
Block a user