V4L/DVB (9448): Bug: fix array size
authorReinhard Nissl <rnissl@gmx.de>
Mon, 21 Jan 2008 19:17:48 +0000 (16:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 29 Dec 2008 19:53:21 +0000 (17:53 -0200)
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 <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/stb0899_drv.c

index 3468f59ecec99e991f7948fdf21c15a0a3ee848f..420dea120ad64d43b447ecaecb0fec9c12a3ddbf 100644 (file)
@@ -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);