[media] vivid: fix smatch errors
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 15 Apr 2016 15:35:31 +0000 (12:35 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 20 Apr 2016 18:47:33 +0000 (15:47 -0300)
commit86b2749ba79e78130dd9f678aa52d57992fbdf1c
tree35097eba25bbbb88ad0a1318b0d6915fd58f1d19
parent1c9f47195ef83ffd59ff665f2006789c0610cff0
[media] vivid: fix smatch errors

The smatch utility got really confused about the grp % 22 code. Rewrote
it so it now understands that there really isn't a buffer overwrite.

vivid-rds-gen.c:82 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 43
vivid-rds-gen.c:83 vivid_rds_generate() error: buffer overflow 'rds->psname' 9 <= 42
vivid-rds-gen.c:89 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 84
vivid-rds-gen.c:90 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 85
vivid-rds-gen.c:92 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 86
vivid-rds-gen.c:93 vivid_rds_generate() error: buffer overflow 'rds->radiotext' 65 <= 87

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-rds-gen.c