aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-10-26 09:01:05 +0000
committerJohn Crispin <blogic@openwrt.org>2015-10-26 09:01:05 +0000
commit7cc0f6e3bcead0a27956704cd1b105aa5f805e4f (patch)
tree3bad1f36686ac6caa692c4e386b843c68e592066 /target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch
parentdf51f2916b87b0c54a0d60932257c9288c845e62 (diff)
downloadmaster-187ad058-7cc0f6e3bcead0a27956704cd1b105aa5f805e4f.tar.gz
master-187ad058-7cc0f6e3bcead0a27956704cd1b105aa5f805e4f.tar.bz2
master-187ad058-7cc0f6e3bcead0a27956704cd1b105aa5f805e4f.zip
brcm2708: update 4.1 patches
As usual, this patches were taken (and rebased) from https://github.com/raspberrypi/linux/commits/rpi-4.1.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch')
-rw-r--r--target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch b/target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch
new file mode 100644
index 0000000000..2365caf195
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.1/0174-bcm2835-camera-check-for-scene-not-being-found.patch
@@ -0,0 +1,31 @@
+From ebdecd6494e5b67306b5e247180f5d5c4b3d8f27 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Wed, 2 Sep 2015 07:33:39 -0400
+Subject: [PATCH 174/203] bcm2835: camera: check for scene not being found
+
+static analysis by cppcheck detected some potential NULL pointer
+dereference issues:
+
+[drivers/media/platform/bcm2835/controls.c:854]: (error) Possible null
+ pointer dereference: scene
+ (and lines 858, 859 too)
+
+it is possible that scene is not found because of an invalue ctrl->val
+and is therefore NULL and hence causing a null pointer dereference.
+
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+---
+ drivers/media/platform/bcm2835/controls.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/media/platform/bcm2835/controls.c
++++ b/drivers/media/platform/bcm2835/controls.c
+@@ -845,6 +845,8 @@ static int ctrl_set_scene_mode(struct bm
+ break;
+ }
+ }
++ if (!scene)
++ return -EINVAL;
+ if (i >= ARRAY_SIZE(scene_configs))
+ return -EINVAL;
+