summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp2/css2400
diff options
context:
space:
mode:
authorDan Carpenter2017-05-18 15:50:19 +0200
committerMauro Carvalho Chehab2017-05-19 11:57:29 +0200
commitd1fec5bdeb18ff98fbe317a9454bcd1fe8da1bee (patch)
treed8628712aa094310412b81bf6ed5f17d5a87c35e /drivers/staging/media/atomisp/pci/atomisp2/css2400
parent[media] atomisp: Fix -Werror=int-in-bool-context compile errors (diff)
downloadkernel-qcow2-linux-d1fec5bdeb18ff98fbe317a9454bcd1fe8da1bee.tar.gz
kernel-qcow2-linux-d1fec5bdeb18ff98fbe317a9454bcd1fe8da1bee.tar.xz
kernel-qcow2-linux-d1fec5bdeb18ff98fbe317a9454bcd1fe8da1bee.zip
[media] atomisp: one char read beyond end of string
We should verify that "ix < max_len" before we test whether we have reached the NUL terminator. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
index 568631698a3d..74b5a1c7ac9a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
@@ -72,9 +72,8 @@ static size_t strnlen_s(
return 0;
}
- for (ix=0;
- ((src_str[ix] != '\0') && (ix< max_len));
- ++ix) /*Nothing else to do*/;
+ for (ix = 0; ix < max_len && src_str[ix] != '\0'; ix++)
+ ;
/* On Error, it will return src_size == max_len*/
return ix;
linux.git/commit/drivers/ps3?id=88393161210493e317ae391696ee8ef463cb3c23'>Fix typos in commentsThomas Weber2010-03-161-1/+1 |/ * powerpc: Remove trailing space in messagesFrans Pop2010-02-091-1/+1 * tree-wide: fix assorted typos all over the placeAndré Goddard Rosa2009-12-041-1/+1 * powerpc/ps3: Workaround for flash memory I/O errorGeoff Levand2009-09-111-3/+62 * drivers/ps3: Add missing annotationsGeert Uytterhoeven2009-06-152-3/+3 * ps3fb/vram: Extract common GPU stuff into <asm/ps3gpu.h>Geert Uytterhoeven2009-06-151-1/+2 * ps3av: Set 16:9 aspect ratio for 720p video modessebastian.blanes@gmail.com2009-06-151-2/+2 * powerpc/ps3: Make ps3av_set_video_mode mode ID signedroel kluin2009-03-111-4/+12 * powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3Stephen Rothwell2009-01-163-19/+19 * powerpc/ps3: The lv1_ routines have u64 parametersStephen Rothwell2009-01-161-11/+13 * powerpc/ps3: Replace the flip_ctl logic in ps3av and ps3fb by a mutexGeert Uytterhoeven2008-11-192-22/+2Star * powerpc/ps3: Fix compile error in ps3-lpm.cAlexey Dobriyan2008-11-051-0/+1 * ps3: Add passthru support for non-audio streamsTakashi Iwai2008-10-201-9/+10 * ps3: Add ps3av_audio_mute_analog()Masakazu Mokuno2008-10-201-0/+16 * [POWERPC] PS3: Remove unsupported wakeup sourcesGeoff Levand2008-05-021-6/+1Star * [POWERPC] PS3: Add time include to lpmFUJITA Tomonori2008-05-02