]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (13414): ttusb-dec: do not overwrite the first part of phys string
authorMárton Németh <nm127@freemail.hu>
Sat, 21 Nov 2009 16:46:12 +0000 (13:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:41:45 +0000 (18:41 -0200)
commit6d8dd899c75fe0be04482c0e707074dc361958aa
tree14f383168d571b79d195e37bedea997ccc510d11
parenta7bedc78927ef7676c0bf90e55d25b4784e1e81d
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