[Issue] S5E9815-5808
[Problem] CID 330540 Buffer not null terminated.
[Cause] buffer size warning : Calling strncpy with a maximun size
argument of 16 bytes on destination array this->if_name of size
might leave the destination string unterminated.
[Solution] fix prevent issue by updating strncpy.
Change-Id: I0735a44c82672d4903dc833676cc4bc02bb3f91a
Signed-off-by: Seungah Lim <sss.lim@samsung.com>
.tunfd = -1,
.sock = -1,
);
- strncpy(this->if_name, name, IFNAMSIZ);
+ strncpy(this->if_name, name, IFNAMSIZ - 1);
this->addresses = linked_list_create();
this->is_xfrm_device = TRUE;