diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-05-29 11:42:59 +0200 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-05-29 11:42:59 +0200 |
commit | 2e6d2fb93c7435890fd4789e4c01456f4150ff7e (patch) | |
tree | 8f1e2de7576f43c060c94a95191f11477199fcf9 /v4l2-apps | |
parent | 3976f3799b7993639ae213780b20448c01f58dd9 (diff) | |
download | mediapointer-dvb-s2-2e6d2fb93c7435890fd4789e4c01456f4150ff7e.tar.gz mediapointer-dvb-s2-2e6d2fb93c7435890fd4789e4c01456f4150ff7e.tar.bz2 |
libv4l: Fix a crash in v4lcontrol_controls_changed()
From: Hans de Goede <hdegoede@redhat.com>
Don't crash when v4lcontrol_controls_changed() gets called and we have
no fake controls (null pointer dereference).
Priority: normal
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'v4l2-apps')
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c index ec3750408..da2fbcdce 100644 --- a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c +++ b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c @@ -487,6 +487,9 @@ int v4lcontrol_controls_changed(struct v4lcontrol_data *data) { int res; + if (!data->controls) + return 0; + res = memcmp(data->shm_values, data->old_values, V4LCONTROL_COUNT * sizeof(unsigned int)); |