Skip to content

Commit

Permalink
V4L/DVB (9448): Bug: fix array size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Reinhard Nissl authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 6f6c268 commit 5613741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/frontends/stb0899_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5613741

Please sign in to comment.