From: Reinhard Nissl Date: Mon, 21 Jan 2008 19:17:48 +0000 (-0300) Subject: V4L/DVB (9448): Bug: fix array size X-Git-Tag: MMI-PSA29.97-13-9~30449^2~496 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=561374113e6dbd717ac4a578d99834219de9d3c1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (9448): Bug: fix array size Bug: a string which contains 4 digits needs an array of size 5. The fifth character will hold the terminating '\0' Signed-off-by: Reinhard Nissl Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/stb0899_drv.c b/drivers/media/dvb/frontends/stb0899_drv.c index 3468f59ecec9..420dea120ad6 100644 --- a/drivers/media/dvb/frontends/stb0899_drv.c +++ b/drivers/media/dvb/frontends/stb0899_drv.c @@ -1277,8 +1277,8 @@ int stb0899_get_dev_id(struct stb0899_state *state) u8 chip_id, release; u16 id; u32 demod_ver = 0, fec_ver = 0; - char demod_str[4] = { 0 }; - char fec_str[4] = { 0 }; + char demod_str[5] = { 0 }; + char fec_str[5] = { 0 }; id = stb0899_read_reg(state, STB0899_DEV_ID); dprintk(state->verbose, FE_DEBUG, 1, "ID reg=[0x%02x]", id);