Re: [PATCH] drm/modes: Fix unterminated strncpy

2019-07-30 Thread Sean Paul
On Tue, Jul 30, 2019 at 04:40:32PM +0800, Chuhong Yuan wrote: > strncpy(dest, src, strlen(src)) leads to unterminated > dest, which is dangerous. > Fix it by using strscpy. > > Signed-off-by: Chuhong Yuan > --- > drivers/gpu/drm/drm_modes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] drm/modes: Fix unterminated strncpy

2019-07-30 Thread Chuhong Yuan
strncpy(dest, src, strlen(src)) leads to unterminated dest, which is dangerous. Fix it by using strscpy. Signed-off-by: Chuhong Yuan --- drivers/gpu/drm/drm_modes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index