Commit e5eb949
committed
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 - 11 parent 3db379f commit e5eb949
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | | - | |
| 1219 | + | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
| |||
0 commit comments