e sys l2ping - limit devv string scanf size to buffer size

fixes T8673
This commit is contained in:
Carsten Haitzler 2020-04-22 12:20:54 +01:00
parent a10f2b6743
commit 6926d1d338
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ _cb_l2ping_ping(void *data EINA_UNUSED, const char *params)
char dev[1024];
Action *a;
if (sscanf(params, "%s %i", dev, &timeout) != 2) return;
if (sscanf(params, "%1023s %i", dev, &timeout) != 2) return;
if (timeout < 1) timeout = 1;
else if (timeout > (1000 * 600)) timeout = 1000 * 600;
a = calloc(1, sizeof(Action));