LF-2474: media: samsung csi: fix string overflow issue
Coverity Issue: 10436670, 10893372, 10436673, fix string overflow issue. The length of v4l2_capability structure driver member is 16, but the length of "csi_samsung_subdev" is 18, when assign it to driver member, it will occur string overflow issue. Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com> Reviewed-by: Robby Cai <robby.cai@nxp.com> (cherry picked from commit b4ffa85521e12cf02fb22e955331c0b1355ee219) (cherry picked from commit 0ff86d26f925534530f0d741c54f9ddfdeadd10b) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
This commit is contained in:
parent
ff039ffe02
commit
15f452a56f
|
@ -1277,7 +1277,7 @@ static int csis_ioc_qcap(struct v4l2_subdev *dev, void *args)
|
|||
{
|
||||
struct csi_state *state = mipi_sd_to_csi_state(dev);
|
||||
struct v4l2_capability *cap = (struct v4l2_capability *)args;
|
||||
strcpy((char *)cap->driver, "csi_samsung_subdev");
|
||||
strcpy((char *)cap->driver, "csi_sam_subdev");
|
||||
cap->bus_info[0] = state->index;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue