V4L/DVB (13414): ttusb-dec: do not overwrite the first part of phys string
commitb1858190fc0180df70e9e7bab24a679129643f43
authorMárton Németh <nm127@freemail.hu>
Sat, 21 Nov 2009 16:46:12 +0000 (21 13:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:41:45 +0000 (5 18:41 -0200)
tree14f383168d571b79d195e37bedea997ccc510d11
parentcd0e280f1bbecebcd20ed0ddd4dd8fb03a506b3c
V4L/DVB (13414): ttusb-dec: do not overwrite the first part of phys string

Use strlcat() to append a string to the previously created first part.

The semantic match that finds this kind of problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression dev;
expression phys;
expression str;
expression size;
@@
  usb_make_path(dev, phys, size);
- strlcpy(phys, str, size);
+ strlcat(phys, str, size);
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/ttusb-dec/ttusb_dec.c