Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct the use of snprintf in owinterface_add
The origin size value of snprintf in owinterface_add was ETH_ALEN, if the string size is too large, it will only allow ETH_ALEN - 1 characters to be copied into the buffer. However, the buffer starts from location inf_name + 1 and the last character must be '\0', which means that the buffer only has at most ETH_ALEN - 2 characters space left. So the size value in snprintf of owinterface_add should be ETH_ALEN - 1
- Loading branch information