The 'sdi' parameter to config API calls can be NULL. Only dereference
after checking its validity.
Reported-By: Alexandre Ferreira <redacted>
(void)cg;
- devc = sdi->priv;
+ devc = sdi ? sdi->priv : NULL;
switch (key) {
case SR_CONF_LIMIT_SAMPLES:
(void)cg;
- devc = sdi->priv;
+ devc = sdi ? sdi->priv : NULL;
switch (key) {
case SR_CONF_LIMIT_SAMPLES:
GVariant *gvar, *arr[2];
GVariantBuilder gvb;
- devc = sdi->priv;
+ devc = sdi ? sdi->priv : NULL;
switch (key) {
case SR_CONF_SCAN_OPTIONS: