samples/net/virtual: Increase sprintk buffers to hold parameter types
This sample app uses a stack buffer to hold the interface name which is generated at runtime using sprintk. The buffer is only sized for the expected range of values, not the full possible range of the datatype (int). To mitigate this, increase the size of the buffer to hold the full range of an int value. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9b2aed731a
commit
be606f0932
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ struct virtual_test_context {
|
|||
static void virtual_test_iface_init(struct net_if *iface)
|
||||
{
|
||||
struct virtual_test_context *ctx = net_if_get_device(iface)->data;
|
||||
char name[16];
|
||||
char name[sizeof("VirtualTest-+##########")];
|
||||
static int count;
|
||||
|
||||
if (ctx->init_done) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue