ipdbg-la: Check if limit samples is valid (leq size of ringuffer)
This commit is contained in:
parent
942719b46c
commit
f3549a1ccf
|
@ -207,7 +207,11 @@ static int config_set(uint32_t key, GVariant *data,
|
||||||
devc->capture_ratio = g_variant_get_uint64(data);
|
devc->capture_ratio = g_variant_get_uint64(data);
|
||||||
break;
|
break;
|
||||||
case SR_CONF_LIMIT_SAMPLES:
|
case SR_CONF_LIMIT_SAMPLES:
|
||||||
devc->limit_samples = g_variant_get_uint64(data);
|
{
|
||||||
|
uint64_t limit_samples = g_variant_get_uint64(data);
|
||||||
|
if (limit_samples <= devc->limit_samples_max)
|
||||||
|
devc->limit_samples = limit_samples;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return SR_ERR_NA;
|
return SR_ERR_NA;
|
||||||
|
|
Loading…
Reference in New Issue